org.apache.jackrabbit.core.cluster
Class NodeTypeRecord

java.lang.Object
  extended by org.apache.jackrabbit.core.cluster.ClusterRecord
      extended by org.apache.jackrabbit.core.cluster.NodeTypeRecord

public class NodeTypeRecord
extends ClusterRecord

Cluster record representing a node type registration, re-registration or unregistration.


Field Summary
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
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
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 appropriate process method.
 
Methods inherited from class org.apache.jackrabbit.core.cluster.ClusterRecord
cancelUpdate, getRevision, getWorkspace, read, readEndMarker, update, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 names
isRegister - true if this is a registration; false if this is a unregistration
record - 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 definition
record - journal record
Method Detail

doRead

protected void doRead()
               throws JournalException
Deserialize this record. Subclass responsibility.

Specified by:
doRead in class ClusterRecord
Throws:
JournalException - if an error occurs

doWrite

protected void doWrite()
                throws JournalException
Serialize this record. Subclass responsibility.

Specified by:
doWrite in class ClusterRecord
Throws:
JournalException - if an error occurs

process

public void process(ClusterRecordProcessor processor)
Process this record, calling the appropriate process method.

Specified by:
process in class ClusterRecord
Parameters:
processor - processor

getOperation

public int getOperation()
Return the operation type.

Returns:
REGISTER, REREGISTER or UNREGISTER

getCollection

public Collection getCollection()
Return the collection of node type definitions or node type names.

Returns:
unmodifiable collection


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.