|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<Integer,R>
jenkins.model.lazy.AbstractLazyLoadRunMap<R>
hudson.model.RunMap<R>
public final class RunMap<R extends Run<?,R>>
This class is multi-thread safe by using copy-on-write technique,
and it also updates the bi-directional links within Run
accordingly.
| Nested Class Summary | |
|---|---|
static interface |
RunMap.Constructor<R extends Run<?,R>>
Run factory. |
| Nested classes/interfaces inherited from class jenkins.model.lazy.AbstractLazyLoadRunMap |
|---|
AbstractLazyLoadRunMap.Direction |
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static Comparator<Comparable> |
COMPARATOR
Deprecated. as of 1.485 Use ReverseComparator |
| Constructor Summary | |
|---|---|
RunMap()
Deprecated. as of 1.485 Use RunMap(File, Constructor). |
|
RunMap(File baseDir,
RunMap.Constructor cons)
|
|
| Method Summary | |
|---|---|
protected FilenameFilter |
createDirectoryFilter()
Lists the actual data directory |
protected BuildReference<R> |
createReference(R r)
Reuses the same reference as much as we can. |
protected String |
getIdOf(R r)
Subtype to provide Run.getId() so that this class doesn't have to depend on it. |
protected int |
getNumberOf(R r)
Subtype to provide Run.getNumber() so that this class doesn't have to depend on it. |
SortedMap<Integer,R> |
getView()
Gets the read-only view of this map. |
Iterator<R> |
iterator()
Walks through builds, newer ones first. |
void |
load(Job job,
RunMap.Constructor<R> cons)
Deprecated. as of 1.485 Use RunMap(File, Constructor) |
R |
newestValue()
This is the newest build (with the biggest build number) |
R |
oldestValue()
This is the oldest build (with the smallest build number) |
R |
put(R r)
|
boolean |
remove(R run)
|
boolean |
removeValue(R run)
|
protected R |
retrieve(File d)
Parses R instance from data in the specified directory. |
| Methods inherited from class jenkins.model.lazy.AbstractLazyLoadRunMap |
|---|
_put, baseDirInitialized, comparator, entrySet, equals, firstKey, get, get, getById, getByNumber, getLoadedBuilds, hashCode, headMap, initBaseDir, isEmpty, lastKey, load, load, load, newestBuild, oldestBuild, purgeCache, put, putAll, reset, search, subMap, tailMap |
| Methods inherited from class java.util.AbstractMap |
|---|
clear, clone, containsKey, containsValue, keySet, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.SortedMap |
|---|
keySet, values |
| Methods inherited from interface java.util.Map |
|---|
clear, containsKey, containsValue, remove, size |
| Field Detail |
|---|
public static final Comparator<Comparable> COMPARATOR
ReverseComparator| Constructor Detail |
|---|
public RunMap()
RunMap(File, Constructor).
public RunMap(File baseDir,
RunMap.Constructor cons)
cons - Used to create new instance of Run.| Method Detail |
|---|
public boolean remove(R run)
public Iterator<R> iterator()
iterator in interface Iterable<R extends Run<?,R>>public boolean removeValue(R run)
removeValue in class AbstractLazyLoadRunMap<R extends Run<?,R>>public SortedMap<Integer,R> getView()
public R newestValue()
public R oldestValue()
protected final int getNumberOf(R r)
AbstractLazyLoadRunMapRun.getNumber() so that this class doesn't have to depend on it.
getNumberOf in class AbstractLazyLoadRunMap<R extends Run<?,R>>protected final String getIdOf(R r)
AbstractLazyLoadRunMapRun.getId() so that this class doesn't have to depend on it.
getIdOf in class AbstractLazyLoadRunMap<R extends Run<?,R>>public R put(R r)
put in class AbstractLazyLoadRunMap<R extends Run<?,R>>protected BuildReference<R> createReference(R r)
If concurrency ends up creating a few extra, that's OK, because we are really just trying to reduce the # of references we create.
createReference in class AbstractLazyLoadRunMap<R extends Run<?,R>>protected FilenameFilter createDirectoryFilter()
AbstractLazyLoadRunMap
createDirectoryFilter in class AbstractLazyLoadRunMap<R extends Run<?,R>>
protected R retrieve(File d)
throws IOException
AbstractLazyLoadRunMapR instance from data in the specified directory.
retrieve in class AbstractLazyLoadRunMap<R extends Run<?,R>>IOException - if the parsing failed. This is just like returning null
except the caller will catch the exception and report it.
public void load(Job job,
RunMap.Constructor<R> cons)
RunMap(File, Constructor)
RunMap of who the owner is.
Traditionally, this method blocked and loaded all the build records on the disk,
but now all the actual loading happens lazily.
job - Job that owns this map.cons - Used to create new instance of Run.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||