|
||||||||||
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 LegacyBuildObject 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 |
Iterator |
getBuildNames()
Obtain an iterator that visits the names of the builds currently held in the cache. |
long |
getNumberOfCachedBuilds()
|
BuildResults |
loadBuildResults(Build build,
long buildNumber)
Cache the build results so that the least used results get purged |
Collection |
loadBuilds()
Obtain the list of build's currently in the cache |
Build |
loadBuilds(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 Exception
start
in interface Startable
Exception
- a generic failurepublic void stop() throws Exception
Startable
stop
in interface Startable
Exception
- A generic failurepublic 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(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(Build build, long buildNumber) throws PersisterException
loadBuildResults
in interface BuildPersisterDecorator
build
- The build whos build results we want to loadbuildNumber
- The number of the build results we are interested in
PersisterException
- Failed to load the build resultspublic Collection loadBuilds() throws PersisterException
loadBuilds
in interface BuildPersisterDecorator
Build
objects.
PersisterException
- A generic failurepublic 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 |