|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.persister.CachedBuildPersisterDecorator
public class CachedBuildPersisterDecorator
Caches the builds so speed up performance and handle transient Build fields.
Constructor Summary | |
---|---|
CachedBuildPersisterDecorator(BuildPersisterDecorator parent)
|
Method Summary | |
---|---|
void |
deleteBuild(Build build)
Remove the build from the internal cache and pass it along to the parent to do the actual deleting |
void |
deleteBuildResults(Build build,
long buildNumber)
Remove a specific build build |
java.util.Iterator |
getBuildNames()
Obtain an iterator that visits the names of the builds currently held in the cache. |
long |
getNumberOfCachedBuilds()
|
boolean |
isActive()
Indicates whether this is currently active. |
BuildResults |
loadBuildResults(java.lang.String planKey,
java.lang.Integer buildNumber)
Cache the build results so that the least used results get purged |
java.util.Collection |
loadBuilds()
Obtain the list of build's currently in the cache |
Build |
loadBuilds(java.lang.String buildName)
Tries to load the requested build from the cache. |
void |
saveBuild(Build build)
Save the build in the internal cache and pass it along to the parent to do the actual saving |
void |
saveBuildResults(Build build,
BuildResults buildResults)
Simply pass this request onto the parent |
void |
start()
Loads the cache from the parent decorator on startup; |
void |
stop()
Stop the component and clean up any resources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CachedBuildPersisterDecorator(BuildPersisterDecorator parent)
Method Detail |
---|
public void start() throws java.lang.Exception
start
in interface Startable
java.lang.Exception
- a generic failurepublic void stop() throws java.lang.Exception
Startable
stop
in interface Startable
java.lang.Exception
- A generic failurepublic boolean isActive()
Startable
Indicates whether this is currently active.
isActive
in interface Startable
true
if this is active, false
otherwise.public void saveBuild(Build build) throws PersisterException
saveBuild
in interface BuildPersisterDecorator
build
- The build to same
PersisterException
- A generic failurepublic void deleteBuild(Build build) throws PersisterException
deleteBuild
in interface BuildPersisterDecorator
build
- The build to delete
PersisterException
- A generic failurepublic void deleteBuildResults(Build build, long buildNumber) throws PersisterException
deleteBuildResults
in interface BuildPersisterDecorator
build
- The build the build belongs tobuildNumber
- The build number
PersisterException
public Build loadBuilds(java.lang.String buildName) throws PersisterException
loadBuilds
in interface BuildPersisterDecorator
buildName
- The name of the build we are after
PersisterException
- A generic failurepublic void saveBuildResults(Build build, BuildResults buildResults) throws PersisterException
saveBuildResults
in interface BuildPersisterDecorator
build
- The buildResults' buildbuildResults
- The build results to persist
PersisterException
- Failed to persist the build resultspublic BuildResults loadBuildResults(java.lang.String planKey, java.lang.Integer buildNumber) throws PersisterException
loadBuildResults
in interface BuildPersisterDecorator
buildNumber
- The number of the build results we are interested in
PersisterException
- Failed to load the build resultspublic java.util.Collection loadBuilds() throws PersisterException
loadBuilds
in interface BuildPersisterDecorator
Build
objects.
PersisterException
- A generic failurepublic java.util.Iterator getBuildNames()
getBuildNames
in interface BuildPersisterDecorator
public long getNumberOfCachedBuilds()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |