Class ClusterRecord
- java.lang.Object
-
- org.apache.jackrabbit.core.cluster.ClusterRecord
-
- Direct Known Subclasses:
ChangeLogRecord
,LockRecord
,NamespaceRecord
,NodeTypeRecord
,PrivilegeRecord
,WorkspaceRecord
public abstract class ClusterRecord extends Object
Base cluster record. Used to serialize and deserialize cluster operations using journal records.
-
-
Field Summary
Fields Modifier and Type Field Description protected static char
END_MARKER
End marker.protected Record
record
Journal record.protected String
workspace
Workspace name.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClusterRecord(Record record)
Create a new instance of this class.protected
ClusterRecord(Record record, String workspace)
Create a new instance of this class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cancelUpdate()
Cancel updating the record.protected abstract void
doRead()
Deserialize this record.protected abstract void
doWrite()
Serialize this record.long
getRevision()
Return the record revision.String
getWorkspace()
Return the workspace name.abstract void
process(ClusterRecordProcessor processor)
Process this record, calling the appropriateprocess
method.void
read()
Deserialize this record.protected void
readEndMarker()
Read end marker.void
update()
Update the record.void
write()
Serialize this record.
-
-
-
Field Detail
-
END_MARKER
protected static final char END_MARKER
End marker.- See Also:
- Constant Field Values
-
record
protected final Record record
Journal record.
-
workspace
protected String workspace
Workspace name.
-
-
Constructor Detail
-
ClusterRecord
protected ClusterRecord(Record record, String workspace)
Create a new instance of this class.- Parameters:
record
- journal recordworkspace
- workspace
-
ClusterRecord
protected ClusterRecord(Record record)
Create a new instance of this class. Used for records that do not have a workspace name.- Parameters:
record
- journal record
-
-
Method Detail
-
read
public final void read() throws JournalException
Deserialize this record.- Throws:
JournalException
- if an error occurs
-
doRead
protected abstract void doRead() throws JournalException
Deserialize this record. Subclass responsibility.- Throws:
JournalException
- if an error occurs
-
write
public final void write() throws JournalException
Serialize this record.- Throws:
JournalException
- if an error occurs
-
doWrite
protected abstract void doWrite() throws JournalException
Serialize this record. Subclass responsibility.- Throws:
JournalException
- if an error occurs
-
readEndMarker
protected void readEndMarker() throws JournalException
Read end marker.- Throws:
JournalException
- if an error occurs
-
process
public abstract void process(ClusterRecordProcessor processor)
Process this record, calling the appropriateprocess
method.- Parameters:
processor
- processor
-
update
public void update() throws JournalException
Update the record.- Throws:
JournalException
- if an error occurs- See Also:
Record.update()
-
cancelUpdate
public void cancelUpdate()
Cancel updating the record.- See Also:
Record.cancelUpdate()
-
getRevision
public long getRevision()
Return the record revision.- Returns:
- record revision
- See Also:
Record.getRevision()
-
getWorkspace
public String getWorkspace()
Return the workspace name.- Returns:
- workspace name
-
-