Class XStreamBuildPersister
- java.lang.Object
-
- com.atlassian.bamboo.persister.file.XStreamBuildPersister
-
- All Implemented Interfaces:
Startable
,BuildPersisterDecorator
public class XStreamBuildPersister extends Object implements BuildPersisterDecorator, Startable
This class provides an XStream implementation of the BambooBuildPersisterDecorator
'er.
-
-
Constructor Summary
Constructors Constructor Description XStreamBuildPersister(StorageLocationService storageLocationService, XStreamFactory xStreamFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteBuildResults(PlanKey planKey, long buildNumber)
Remove the build files for the given build buildNumber.boolean
isActive()
Indicates whether this is currently active.@Nullable BuildResults
loadBuildResults(Key planKey, int buildNumber)
Load the build buildresults for the given build numbervoid
saveBuildResults(PlanKey planKey, BuildResults buildResults)
Save the build resultsvoid
start()
Load the build data file map.void
stop()
Do nothing!
-
-
-
Constructor Detail
-
XStreamBuildPersister
public XStreamBuildPersister(StorageLocationService storageLocationService, XStreamFactory xStreamFactory)
-
-
Method Detail
-
start
public void start()
Load the build data file map.
-
stop
public void stop()
Do nothing!
-
isActive
public boolean isActive()
Description copied from interface:Startable
Indicates whether this is currently active.
-
saveBuildResults
public void saveBuildResults(PlanKey planKey, BuildResults buildResults) throws PersisterException
Save the build results- Specified by:
saveBuildResults
in interfaceBuildPersisterDecorator
- Parameters:
planKey
-buildResults
- The results to save @throws PersisterException An error- Throws:
PersisterException
- when failed to persist the build results
-
loadBuildResults
@Nullable public @Nullable BuildResults loadBuildResults(Key planKey, int buildNumber) throws PersisterException
Load the build buildresults for the given build number- Specified by:
loadBuildResults
in interfaceBuildPersisterDecorator
- Parameters:
planKey
-buildNumber
- The build top load- Returns:
- The build results
- Throws:
PersisterException
- An error
-
deleteBuildResults
public void deleteBuildResults(PlanKey planKey, long buildNumber) throws PersisterException
Remove the build files for the given build buildNumber.- Specified by:
deleteBuildResults
in interfaceBuildPersisterDecorator
- Parameters:
planKey
-buildNumber
- The number of the build to delete @throws PersisterException A generic failure- Throws:
PersisterException
-
-