Class BandanaJournalStateStore
- java.lang.Object
-
- com.atlassian.confluence.impl.journal.BandanaJournalStateStore
-
- All Implemented Interfaces:
JournalStateStore
@Internal public class BandanaJournalStateStore extends Object implements JournalStateStore
Stores journal queue state in bandana.- Since:
- 5.9
-
-
Constructor Summary
Constructors Constructor Description BandanaJournalStateStore(com.atlassian.bandana.BandanaPersister bandanaPersister, com.atlassian.bandana.BandanaContext bandanaContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMostRecentId(@NonNull JournalIdentifier journalId)Returns the most recent id for a journal or 0 if no id has been stored yet.voidresetAllJournalStates()Resets the state of all journals.voidsetMostRecentId(@NonNull JournalIdentifier journalId, long id)Set the most recent identifier for a journal.
-
-
-
Method Detail
-
getMostRecentId
public long getMostRecentId(@NonNull JournalIdentifier journalId) throws org.springframework.dao.DataAccessException
Description copied from interface:JournalStateStoreReturns the most recent id for a journal or 0 if no id has been stored yet.New journal is automatically created if a journal with the given name does not exists.
- Specified by:
getMostRecentIdin interfaceJournalStateStore- Parameters:
journalId- id of the journal- Returns:
- most recent id for a journal or 0 if no id has been stored yet
- Throws:
org.springframework.dao.DataAccessException- if reading the id failed
-
setMostRecentId
public void setMostRecentId(@NonNull JournalIdentifier journalId, long id) throws org.springframework.dao.DataAccessException
Description copied from interface:JournalStateStoreSet the most recent identifier for a journal.New journal is automatically created if a journal with the given name does not exists.
Only positive identifiers (e.g. > 0) can be stored.
- Specified by:
setMostRecentIdin interfaceJournalStateStore- Parameters:
journalId- id of the journalid- identifier to store as the most recent id- Throws:
org.springframework.dao.DataAccessException- if persisting the id failed.
-
resetAllJournalStates
public void resetAllJournalStates() throws org.springframework.dao.DataAccessExceptionDescription copied from interface:JournalStateStoreResets the state of all journals.After calling this method all
JournalStateStore.getMostRecentId(JournalIdentifier)calls will initially return 0.- Specified by:
resetAllJournalStatesin interfaceJournalStateStore- Throws:
org.springframework.dao.DataAccessException- if reset fails
-
-