Class NodeTypeRecord
- java.lang.Object
-
- org.apache.jackrabbit.core.cluster.ClusterRecord
-
- org.apache.jackrabbit.core.cluster.NodeTypeRecord
-
public class NodeTypeRecord extends ClusterRecord
Cluster record representing a node type registration, re-registration or unregistration.
-
-
Field Summary
Fields Modifier and Type Field Description static int
REGISTER
Operation type: registration.static int
REREGISTER
Operation type: re-registration.static int
UNREGISTER
Operation type: unregistration.-
Fields inherited from class org.apache.jackrabbit.core.cluster.ClusterRecord
END_MARKER, record, workspace
-
-
Constructor Summary
Constructors Constructor Description NodeTypeRecord(Collection collection, boolean isRegister, Record record)
Create a new instance of this class.NodeTypeRecord(QNodeTypeDefinition ntDef, Record record)
Create a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doRead()
Deserialize this record.protected void
doWrite()
Serialize this record.Collection
getCollection()
Return the collection of node type definitions or node type names.int
getOperation()
Return the operation type.void
process(ClusterRecordProcessor processor)
Process this record, calling the appropriateprocess
method.-
Methods inherited from class org.apache.jackrabbit.core.cluster.ClusterRecord
cancelUpdate, getRevision, getWorkspace, read, readEndMarker, update, write
-
-
-
-
Field Detail
-
REGISTER
public static final int REGISTER
Operation type: registration.- See Also:
- Constant Field Values
-
REREGISTER
public static final int REREGISTER
Operation type: re-registration.- See Also:
- Constant Field Values
-
UNREGISTER
public static final int UNREGISTER
Operation type: unregistration.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NodeTypeRecord
public NodeTypeRecord(Collection collection, boolean isRegister, Record record)
Create a new instance of this class. Used when serializing a node type registration or unregistration.- Parameters:
collection
- collection of node types definitions or node type namesisRegister
-true
if this is a registration;false
if this is a unregistrationrecord
- journal record
-
NodeTypeRecord
public NodeTypeRecord(QNodeTypeDefinition ntDef, Record record)
Create a new instance of this class. Used when serializing a node type re-registration.- Parameters:
ntDef
- node type definitionrecord
- journal record
-
-
Method Detail
-
doRead
protected void doRead() throws JournalException
Deserialize this record. Subclass responsibility.- Specified by:
doRead
in classClusterRecord
- Throws:
JournalException
- if an error occurs
-
doWrite
protected void doWrite() throws JournalException
Serialize this record. Subclass responsibility.- Specified by:
doWrite
in classClusterRecord
- Throws:
JournalException
- if an error occurs
-
process
public void process(ClusterRecordProcessor processor)
Process this record, calling the appropriateprocess
method.- Specified by:
process
in classClusterRecord
- Parameters:
processor
- processor
-
getOperation
public int getOperation()
Return the operation type.- Returns:
REGISTER
,REREGISTER
orUNREGISTER
-
getCollection
public Collection getCollection()
Return the collection of node type definitions or node type names.- Returns:
- unmodifiable collection
-
-