Interface JournalStateStore
-
- All Known Implementing Classes:
BandanaJournalStateStore
,CachingJournalStateStore
,FilesystemJournalStateStore
public interface JournalStateStore
Provides per node persistence for saving the id of the most recent entry that has been retrieved from the journal.- Since:
- 5.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getMostRecentId(@NonNull JournalIdentifier journalId)
Returns the most recent id for a journal or 0 if no id has been stored yet.void
resetAllJournalStates()
Resets the state of all journals.void
setMostRecentId(@NonNull JournalIdentifier journalId, long id)
Set the most recent identifier for a journal.
-
-
-
Method Detail
-
getMostRecentId
long getMostRecentId(@NonNull JournalIdentifier journalId) throws org.springframework.dao.DataAccessException
Returns 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.
- 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
void setMostRecentId(@NonNull JournalIdentifier journalId, long id) throws org.springframework.dao.DataAccessException
Set 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.
- 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
void resetAllJournalStates() throws org.springframework.dao.DataAccessException
Resets the state of all journals.After calling this method all
getMostRecentId(com.atlassian.confluence.api.model.journal.JournalIdentifier)
calls will initially return 0.- Throws:
org.springframework.dao.DataAccessException
- if reset fails
-
-