Class ChainStatePersisterImpl
java.lang.Object
com.atlassian.bamboo.chains.execution.ChainStatePersisterImpl
- All Implemented Interfaces:
ChainStatePersister
-
Constructor Summary
ConstructorDescriptionChainStatePersisterImpl
(@NotNull XStreamFactory xStreamFactory, @NotNull FeatureManager featureManager) ChainStatePersisterImpl
(@NotNull XStreamFactory xStreamFactory, @NotNull FeatureManager featureManager, @NotNull File storagePath) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendToJournal
(@NotNull PlanResultKey key, @NotNull ChainStateJournalEntry journalEntry) Append to journal for a key.@NotNull List<Pair<PlanResultKey,
ChainState>> loadAndReplayAll
(@NotNull Set<PlanResultKey> chainResultsToRestore) Loads stored objects matching provided keys and replays the journal on them.void
remove
(@NotNull PlanResultKey key) RemoveChainState
from the storage.void
save
(@NotNull ChainState state) Save aChainState
in the storage
-
Constructor Details
-
ChainStatePersisterImpl
public ChainStatePersisterImpl(@NotNull @NotNull XStreamFactory xStreamFactory, @NotNull @NotNull FeatureManager featureManager) -
ChainStatePersisterImpl
public ChainStatePersisterImpl(@NotNull @NotNull XStreamFactory xStreamFactory, @NotNull @NotNull FeatureManager featureManager, @NotNull @NotNull File storagePath)
-
-
Method Details
-
loadAndReplayAll
@NotNull public @NotNull List<Pair<PlanResultKey,ChainState>> loadAndReplayAll(@NotNull @NotNull Set<PlanResultKey> chainResultsToRestore) Description copied from interface:ChainStatePersister
Loads stored objects matching provided keys and replays the journal on them. Removes all other journals.- Specified by:
loadAndReplayAll
in interfaceChainStatePersister
-
save
Description copied from interface:ChainStatePersister
Save aChainState
in the storage- Specified by:
save
in interfaceChainStatePersister
-
remove
Description copied from interface:ChainStatePersister
RemoveChainState
from the storage.- Specified by:
remove
in interfaceChainStatePersister
-
appendToJournal
public void appendToJournal(@NotNull @NotNull PlanResultKey key, @NotNull @NotNull ChainStateJournalEntry journalEntry) Description copied from interface:ChainStatePersister
Append to journal for a key.- Specified by:
appendToJournal
in interfaceChainStatePersister
-