public class BuildCache extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BuildCache.BuildComparator
Allows returned downstreamBuild Sets to be sorted first by project name and then by number.
|
| Constructor and Description |
|---|
BuildCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
doGarbageCollect() |
static BuildCache |
getCache()
Returns the instance of this class.
|
Set<hudson.model.Run> |
getDownstreamBuilds(hudson.model.Run run)
Returns all downstream builds triggered by the upstream builds.
|
Set<hudson.model.Run> |
getDownstreamBuildsByProject(hudson.model.Run upstreamBuild,
hudson.model.Job downstreamProject)
Fetches all downstream builds belonging to the specified project.
|
String |
getStatistics()
Builds a summary report of the cache
|
static void |
initCache()
Initialize the cache after all jobs are loaded.
|
void |
reloadCache()
Clears and reloads cache from disk.
|
protected void |
removeFromCache(hudson.model.Run run)
Remove a run from the cache.
|
void |
startGarbageCollector() |
static void |
stop() |
void |
stopGarbageCollector() |
protected void |
updateCache(hudson.model.Run downstreamRun)
Parses upstream causes in a downstream build and updates the cache.
|
public static BuildCache getCache()
@Initializer(after=JOB_LOADED) public static void initCache()
public void reloadCache()
E.g. @Initializer(after = JOB_LOADED)
protected void updateCache(hudson.model.Run downstreamRun)
downstreamRun - Downstream build to update the cache withpublic void doGarbageCollect()
public void stopGarbageCollector()
public void startGarbageCollector()
public Set<hudson.model.Run> getDownstreamBuilds(hudson.model.Run run)
run - The upstream buildpublic String getStatistics()
protected void removeFromCache(hudson.model.Run run)
run - The run to remove from the cache.public Set<hudson.model.Run> getDownstreamBuildsByProject(hudson.model.Run upstreamBuild, hudson.model.Job downstreamProject)
upstreamBuild - The upstream builddownstreamProject - The downstream projectCopyright © 2016–2018. All rights reserved.