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
Constructors Constructor Description XStreamJournalImpl(@NotNull XStreamFactory xStreamFactory, @NotNull Supplier<File> storageDirectorySupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appendToJournal(K key, V journalEntry)
Append to journal for a key.void
cleanStorage()
Remove all persisted objectsvoid
closeJournal(K key)
Closes the journal.@NotNull List<V>
loadJournal(K key)
Load entire journal from storage.void
openJournal(K key)
Opens a journal for new item.
-
-
-
Constructor Detail
-
XStreamJournalImpl
public XStreamJournalImpl(@NotNull @NotNull XStreamFactory xStreamFactory, @NotNull @NotNull Supplier<File> storageDirectorySupplier)
-
-
Method Detail
-
loadJournal
@NotNull public @NotNull List<V> loadJournal(@NotNull K key)
Load entire journal from storage.- Specified by:
loadJournal
in interfaceXStreamJournal<K extends Key,V extends XStreamJournalEntry>
-
appendToJournal
public boolean appendToJournal(@NotNull K key, @NotNull V journalEntry)
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
public void openJournal(@NotNull K key)
Description copied from interface:XStreamJournal
Opens a journal for new item.- Specified by:
openJournal
in interfaceXStreamJournal<K extends Key,V extends XStreamJournalEntry>
-
closeJournal
public void closeJournal(@NotNull K key)
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
-
-