com.atlassian.confluence.impl.journal
Class FilesystemJournalStateStore

java.lang.Object
  extended by com.atlassian.confluence.impl.journal.FilesystemJournalStateStore
All Implemented Interfaces:
JournalStateStore

public class FilesystemJournalStateStore
extends java.lang.Object
implements JournalStateStore

Persists journal state in the local home directory on each node.

Since:
5.6

Constructor Summary
FilesystemJournalStateStore(BootstrapManager bootstrapManager)
           
 
Method Summary
 long getMostRecentId(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(JournalIdentifier journalId, long id)
          Set the most recent identifier for a journal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilesystemJournalStateStore

public FilesystemJournalStateStore(BootstrapManager bootstrapManager)
Method Detail

getMostRecentId

public long getMostRecentId(@Nonnull
                            JournalIdentifier journalId)
                     throws org.springframework.dao.DataAccessException
Description copied from interface: JournalStateStore
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.

Specified by:
getMostRecentId in interface JournalStateStore
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: JournalStateStore
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.

Specified by:
setMostRecentId in interface JournalStateStore
Parameters:
journalId - id of the journal
id - 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.DataAccessException
Description copied from interface: JournalStateStore
Resets the state of all journals.

After calling this method all JournalStateStore.getMostRecentId(com.atlassian.confluence.api.model.journal.JournalIdentifier) calls will initially return 0.

Specified by:
resetAllJournalStates in interface JournalStateStore
Throws:
org.springframework.dao.DataAccessException - if reset fails


Copyright © 2003-2014 Atlassian. All Rights Reserved.