Class XStreamJournalImpl<K extends Key,V extends XStreamJournalEntry>
java.lang.Object
com.atlassian.bamboo.persister.xstream.journal.XStreamJournalImpl<K,V>
- All Implemented Interfaces:
XStreamJournal<K,
V>
public class XStreamJournalImpl<K extends Key,V extends XStreamJournalEntry>
extends Object
implements XStreamJournal<K,V>
-
Constructor Summary
ConstructorDescriptionXStreamJournalImpl
(@NotNull XStreamFactory xStreamFactory, @NotNull SecretEncryptionService secretEncryptionService, @NotNull Supplier<File> storageDirectorySupplier) -
Method Summary
Modifier and TypeMethodDescriptionboolean
appendToJournal
(K key, V journalEntry) Append to journal for a key.void
Remove all persisted objectsvoid
closeJournal
(K key) Closes the journal.loadJournal
(K key) Load entire journal from storage.void
openJournal
(K key) Opens a journal for new item.
-
Constructor Details
-
XStreamJournalImpl
public XStreamJournalImpl(@NotNull @NotNull XStreamFactory xStreamFactory, @NotNull @NotNull SecretEncryptionService secretEncryptionService, @NotNull @NotNull Supplier<File> storageDirectorySupplier)
-
-
Method Details
-
loadJournal
Load entire journal from storage.- Specified by:
loadJournal
in interfaceXStreamJournal<K extends Key,
V extends XStreamJournalEntry>
-
appendToJournal
Append to journal for a key.- Specified by:
appendToJournal
in interfaceXStreamJournal<K extends Key,
V extends XStreamJournalEntry> - Returns:
- true if journal write actually happened.
-
openJournal
Description copied from interface:XStreamJournal
Opens a journal for new item.- Specified by:
openJournal
in interfaceXStreamJournal<K extends Key,
V extends XStreamJournalEntry>
-
closeJournal
Description copied from interface:XStreamJournal
Closes the journal. After this call no more entries are added to the journal and the journal file is deleted.- Specified by:
closeJournal
in interfaceXStreamJournal<K extends Key,
V extends XStreamJournalEntry>
-
cleanStorage
public void cleanStorage()Remove all persisted objects
-