public class FilesystemJournalStateStore extends Object implements JournalStateStore
Constructor and Description |
---|
FilesystemJournalStateStore(BootstrapManager bootstrapManager) |
Modifier and Type | Method and 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.
|
public FilesystemJournalStateStore(BootstrapManager bootstrapManager)
public long getMostRecentId(@NonNull JournalIdentifier journalId) throws org.springframework.dao.DataAccessException
JournalStateStore
New journal is automatically created if a journal with the given name does not exists.
getMostRecentId
in interface JournalStateStore
journalId
- id of the journalorg.springframework.dao.DataAccessException
- if reading the id failedpublic void setMostRecentId(@NonNull JournalIdentifier journalId, long id) throws org.springframework.dao.DataAccessException
JournalStateStore
New journal is automatically created if a journal with the given name does not exists.
Only positive identifiers (e.g. > 0) can be stored.
setMostRecentId
in interface JournalStateStore
journalId
- id of the journalid
- identifier to store as the most recent idorg.springframework.dao.DataAccessException
- if persisting the id failed.public void resetAllJournalStates() throws org.springframework.dao.DataAccessException
JournalStateStore
After calling this method all
JournalStateStore.getMostRecentId(com.atlassian.confluence.api.model.journal.JournalIdentifier)
calls will initially return 0.
resetAllJournalStates
in interface JournalStateStore
org.springframework.dao.DataAccessException
- if reset failsCopyright © 2003–2020 Atlassian. All rights reserved.