public class CachedBuildPersisterDecorator extends Object implements BuildPersisterDecorator
Constructor and Description |
---|
CachedBuildPersisterDecorator(BuildPersisterDecorator parent) |
Modifier and Type | Method and Description |
---|---|
void |
deleteBuildResults(ImmutableBuildable buildable,
long buildNumber)
Remove a specific build build
|
boolean |
isActive()
Indicates whether this is currently active.
|
BuildResults |
loadBuildResults(Key planKey,
int buildNumber)
Cache the build results so that the least used results get purged
|
BuildResults |
loadBuildResults(String planKey,
Integer buildNumber)
Deprecated.
since 5.11, use
loadBuildResults(Key, int) instead |
void |
saveBuildResults(ImmutableBuildable buildable,
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
|
public CachedBuildPersisterDecorator(BuildPersisterDecorator parent)
public void start() throws Exception
public void stop() throws Exception
Startable
public boolean isActive()
Startable
Indicates whether this is currently active.
public void deleteBuildResults(ImmutableBuildable buildable, long buildNumber) throws PersisterException
deleteBuildResults
in interface BuildPersisterDecorator
buildable
- buildNumber
- The build numberPersisterException
public void saveBuildResults(ImmutableBuildable buildable, BuildResults buildResults) throws PersisterException
saveBuildResults
in interface BuildPersisterDecorator
buildResults
- The build results to persistPersisterException
- when failed to persist the build results@Nullable @Deprecated public BuildResults loadBuildResults(String planKey, Integer buildNumber) throws PersisterException
loadBuildResults(Key, int)
insteadBuildPersisterDecorator
loadBuildResults
in interface BuildPersisterDecorator
planKey
- buildNumber
- The number of the build results we are interested inPersisterException
@Nullable public BuildResults loadBuildResults(Key planKey, int buildNumber) throws PersisterException
loadBuildResults
in interface BuildPersisterDecorator
buildNumber
- The number of the build results we are interested inPersisterException
- when failed to load the build resultsCopyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.