Class AbstractXStreamPersister<K extends Key,V>
- java.lang.Object
-
- com.atlassian.bamboo.persister.xstream.AbstractXStreamPersister<K,V>
-
- All Implemented Interfaces:
XStreamObjectPersister<K,V>
- Direct Known Subclasses:
XStreamChainStatePersisterImpl
,XStreamCurrentlyBuildingPersisterImpl
,XStreamDeploymentInProgressPersisterImpl
,XStreamSecureTokenPersister
public abstract class AbstractXStreamPersister<K extends Key,V> extends Object implements XStreamObjectPersister<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanStorage()
Remove all persisted objectsV
load(K key)
Load object from the storage@NotNull Iterable<Pair<K,V>>
loadAndRemoveAll()
Lazily loads all stored objects and removes files from storage.void
remove(K key)
Remove object identified by key from the storagevoid
save(V objectToBePersisted, boolean saveEvenIfFileExists)
SaveCurrentlyBuilding
in the storageprotected File
storageFile(K key)
Create storage file for persisting objectprotected File
temporaryFile(K key)
Create temporary file for persisting object
-
-
-
Method Detail
-
load
@NotNull public V load(@NotNull K key)
Description copied from interface:XStreamObjectPersister
Load object from the storage- Specified by:
load
in interfaceXStreamObjectPersister<K extends Key,V>
- Returns:
- object fetched from the storage
-
save
public void save(@NotNull V objectToBePersisted, boolean saveEvenIfFileExists)
Description copied from interface:XStreamObjectPersister
SaveCurrentlyBuilding
in the storage- Specified by:
save
in interfaceXStreamObjectPersister<K extends Key,V>
-
remove
public void remove(@NotNull K key)
Description copied from interface:XStreamObjectPersister
Remove object identified by key from the storage- Specified by:
remove
in interfaceXStreamObjectPersister<K extends Key,V>
-
cleanStorage
public void cleanStorage()
Description copied from interface:XStreamObjectPersister
Remove all persisted objects- Specified by:
cleanStorage
in interfaceXStreamObjectPersister<K extends Key,V>
-
loadAndRemoveAll
@NotNull public @NotNull Iterable<Pair<K,V>> loadAndRemoveAll()
Description copied from interface:XStreamObjectPersister
Lazily loads all stored objects and removes files from storage.- Specified by:
loadAndRemoveAll
in interfaceXStreamObjectPersister<K extends Key,V>
-
temporaryFile
protected File temporaryFile(@NotNull K key)
Create temporary file for persisting object
-
-