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
ConstructorsConstructorDescriptionXStreamJournalImpl(@NotNull XStreamFactory xStreamFactory, @NotNull SecretEncryptionService secretEncryptionService, @NotNull Supplier<File> storageDirectorySupplier) -
Method Summary
Modifier and TypeMethodDescriptionbooleanappendToJournal(K key, V journalEntry) Append to journal for a key.voidRemove all persisted objectsvoidcloseJournal(K key) Closes the journal.loadJournal(K key) Load entire journal from storage.voidopenJournal(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:
loadJournalin interfaceXStreamJournal<K extends Key,V extends XStreamJournalEntry>
-
appendToJournal
Append to journal for a key.- Specified by:
appendToJournalin interfaceXStreamJournal<K extends Key,V extends XStreamJournalEntry> - Returns:
- true if journal write actually happened.
-
openJournal
Description copied from interface:XStreamJournalOpens a journal for new item.- Specified by:
openJournalin interfaceXStreamJournal<K extends Key,V extends XStreamJournalEntry>
-
closeJournal
Description copied from interface:XStreamJournalCloses the journal. After this call no more entries are added to the journal and the journal file is deleted.- Specified by:
closeJournalin interfaceXStreamJournal<K extends Key,V extends XStreamJournalEntry>
-
cleanStorage
public void cleanStorage()Remove all persisted objects
-