Class DatabaseJournal.DatabaseRevision
- java.lang.Object
-
- org.apache.jackrabbit.core.journal.DatabaseJournal.DatabaseRevision
-
- All Implemented Interfaces:
InstanceRevision
- Enclosing class:
- DatabaseJournal
public class DatabaseJournal.DatabaseRevision extends Object implements InstanceRevision
This class manages the local revision of the cluster node. It persists the local revision in the LOCAL_REVISIONS table in the clustering database.
-
-
Constructor Summary
Constructors Constructor Description DatabaseRevision()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the instance revision.long
get()
Return current instance revision.protected long
init(long revision)
Checks whether there's a local revision value in the database for this cluster node.void
set(long localRevision)
Set current instance revision.
-
-
-
Method Detail
-
init
protected long init(long revision) throws JournalException
Checks whether there's a local revision value in the database for this cluster node. If not, it writes the given default revision to the database.- Parameters:
revision
- the default value for the local revision counter- Returns:
- the local revision
- Throws:
JournalException
- on error
-
get
public long get()
Description copied from interface:InstanceRevision
Return current instance revision.- Specified by:
get
in interfaceInstanceRevision
- Returns:
- instance revision
-
set
public void set(long localRevision) throws JournalException
Description copied from interface:InstanceRevision
Set current instance revision.- Specified by:
set
in interfaceInstanceRevision
- Parameters:
localRevision
- new instance revision- Throws:
JournalException
- if some error occurs
-
close
public void close()
Description copied from interface:InstanceRevision
Closes the instance revision.- Specified by:
close
in interfaceInstanceRevision
-
-