Modifier and Type | Class and Description |
---|---|
static interface |
RunMap.Constructor<R extends Run<?,R>>
Run factory. |
AbstractLazyLoadRunMap.Direction
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static Comparator<Comparable> |
COMPARATOR
Deprecated.
as of 1.485
Use
ReverseComparator |
RunIdMigrator |
runIdMigrator
Normally overwritten by
LazyBuildMixIn.onLoad(hudson.model.ItemGroup<? extends hudson.model.Item>, java.lang.String) or LazyBuildMixIn.onCreatedFromScratch() , in turn created during Job.onLoad(hudson.model.ItemGroup<? extends hudson.model.Item>, java.lang.String) . |
dir
Constructor and Description |
---|
RunMap()
Deprecated.
as of 1.485
Use
RunMap(File, Constructor) . |
RunMap(File baseDir,
RunMap.Constructor cons) |
Modifier and Type | Method and Description |
---|---|
protected BuildReference<R> |
createReference(R r)
Reuses the same reference as much as we can.
|
R |
getById(String id) |
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)
Add a new build to the map.
|
boolean |
remove(R run) |
boolean |
removeValue(R run) |
protected R |
retrieve(File d)
Parses
R instance from data in the specified directory. |
_put, baseDirInitialized, comparator, entrySet, equals, firstKey, get, get, getByNumber, getLoadedBuilds, hashCode, headMap, initBaseDir, isEmpty, lastKey, maxNumberOnDisk, newestBuild, oldestBuild, proposeNewNumber, purgeCache, put, putAll, reset, runExists, search, subMap, tailMap, updateBaseDir
clear, clone, containsKey, containsValue, keySet, remove, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, forEach, getOrDefault, merge, putIfAbsent, remove, remove, replace, replace, replaceAll, size
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public RunIdMigrator runIdMigrator
LazyBuildMixIn.onLoad(hudson.model.ItemGroup<? extends hudson.model.Item>, java.lang.String)
or LazyBuildMixIn.onCreatedFromScratch()
, in turn created during Job.onLoad(hudson.model.ItemGroup<? extends hudson.model.Item>, java.lang.String)
.@Deprecated public static final Comparator<Comparable> COMPARATOR
ReverseComparator
@Deprecated public RunMap()
RunMap(File, Constructor)
.public RunMap(File baseDir, RunMap.Constructor cons)
cons
- Used to create new instance of Run
.public boolean remove(R run)
public boolean removeValue(R run)
removeValue
in class AbstractLazyLoadRunMap<R extends Run<?,R>>
public R newestValue()
public R oldestValue()
protected final int getNumberOf(R r)
AbstractLazyLoadRunMap
Run.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)
AbstractLazyLoadRunMap
Run.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)
AbstractLazyLoadRunMap.put(Integer, Object)
).put
in class AbstractLazyLoadRunMap<R extends Run<?,R>>
public R getById(String id)
getById
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 R retrieve(File d) throws IOException
AbstractLazyLoadRunMap
R
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.@Deprecated 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
.Copyright © 2004–2021. All rights reserved.