com.atlassian.bamboo.v2.build
Class XStreamCurrentlyBuildingPersisterImpl

java.lang.Object
  extended by com.atlassian.bamboo.persister.xstream.AbstractXStreamPersister<ResultKey,CurrentlyBuilding>
      extended by com.atlassian.bamboo.v2.build.XStreamCurrentlyBuildingPersisterImpl
All Implemented Interfaces:
XStreamObjectPersister<ResultKey,CurrentlyBuilding>

public class XStreamCurrentlyBuildingPersisterImpl
extends AbstractXStreamPersister<ResultKey,CurrentlyBuilding>


Constructor Summary
XStreamCurrentlyBuildingPersisterImpl(com.thoughtworks.xstream.XStream xStream, com.google.common.base.Supplier<File> stateDirectorySupplier, AgentManager agentManager, ElasticImageConfigurationAccessor elasticImageConfigurationAccessor)
           
 
Method Summary
 CurrentlyBuilding load(ResultKey key)
          Need to restore BuildAgent and ElasticImageConfiguration lists in ExecutableInfo
 Iterable<Pair<ResultKey,CurrentlyBuilding>> loadAndRemoveAll()
          Lazily loads all stored objects and removes files from storage.
 
Methods inherited from class com.atlassian.bamboo.persister.xstream.AbstractXStreamPersister
cleanStorage, remove, save, storageFile, temporaryFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XStreamCurrentlyBuildingPersisterImpl

public XStreamCurrentlyBuildingPersisterImpl(com.thoughtworks.xstream.XStream xStream,
                                             com.google.common.base.Supplier<File> stateDirectorySupplier,
                                             AgentManager agentManager,
                                             ElasticImageConfigurationAccessor elasticImageConfigurationAccessor)
Method Detail

load

@NotNull
public CurrentlyBuilding load(@NotNull
                                      ResultKey key)
Need to restore BuildAgent and ElasticImageConfiguration lists in ExecutableInfo

Specified by:
load in interface XStreamObjectPersister<ResultKey,CurrentlyBuilding>
Overrides:
load in class AbstractXStreamPersister<ResultKey,CurrentlyBuilding>
Returns:
object fetched from the storage

loadAndRemoveAll

@NotNull
public Iterable<Pair<ResultKey,CurrentlyBuilding>> loadAndRemoveAll()
Description copied from interface: XStreamObjectPersister
Lazily loads all stored objects and removes files from storage.

Specified by:
loadAndRemoveAll in interface XStreamObjectPersister<ResultKey,CurrentlyBuilding>
Overrides:
loadAndRemoveAll in class AbstractXStreamPersister<ResultKey,CurrentlyBuilding>


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.