public abstract class ClusterRecord extends Object
Modifier and Type | Field and Description |
---|---|
protected static char |
END_MARKER
End marker.
|
protected Record |
record
Journal record.
|
protected String |
workspace
Workspace name.
|
Modifier | Constructor and 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.
|
Modifier and Type | Method and 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 appropriate
process
method. |
void |
read()
Deserialize this record.
|
protected void |
readEndMarker()
Read end marker.
|
void |
update()
Update the record.
|
void |
write()
Serialize this record.
|
protected static final char END_MARKER
protected final Record record
protected String workspace
protected ClusterRecord(Record record, String workspace)
record
- journal recordworkspace
- workspaceprotected ClusterRecord(Record record)
record
- journal recordpublic final void read() throws JournalException
JournalException
- if an error occursprotected abstract void doRead() throws JournalException
JournalException
- if an error occurspublic final void write() throws JournalException
JournalException
- if an error occursprotected abstract void doWrite() throws JournalException
JournalException
- if an error occursprotected void readEndMarker() throws JournalException
JournalException
- if an error occurspublic abstract void process(ClusterRecordProcessor processor)
process
method.processor
- processorpublic void update() throws JournalException
JournalException
- if an error occursRecord.update()
public void cancelUpdate()
Record.cancelUpdate()
public long getRevision()
Record.getRevision()
public String getWorkspace()
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.