org.apache.jackrabbit.core.cluster
Class LockRecord

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

public class LockRecord
extends ClusterRecord

Cluster record representing a lock or unlock operation.


Field Summary
 
Fields inherited from class org.apache.jackrabbit.core.cluster.ClusterRecord
END_MARKER, record, workspace
 
Constructor Summary
LockRecord(NodeId nodeId, boolean isDeep, String lockOwner, Record record, String workspace)
          Create a new instance of this class.
LockRecord(NodeId nodeId, Record record, String workspace)
          Create a new instance of this class.
 
Method Summary
protected  void doRead()
          Deserialize this record.
protected  void doWrite()
          Serialize this record.
 NodeId getNodeId()
          Return the node id.
 String getOwner()
          Return the lock owner associated with the lock operation.
 String getUserId()
          Deprecated. User getOwner() instead.
 boolean isDeep()
          Return a flag indicating whether the lock is deep.
 boolean isLock()
          Return a flag indicating whether this is a lock or an unlock operation.
 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
 

Constructor Detail

LockRecord

public LockRecord(NodeId nodeId,
                  boolean isDeep,
                  String lockOwner,
                  Record record,
                  String workspace)
Create a new instance of this class. Used when a lock operation should be serialized.

Parameters:
nodeId - node id
isDeep - flag indicating whether the lock is deep
lockOwner - the name of the lock owner.
record - journal record
workspace - workspace

LockRecord

public LockRecord(NodeId nodeId,
                  Record record,
                  String workspace)
Create a new instance of this class. Used when an unlock operation should be serialized.

Parameters:
nodeId - node id
record - journal record
workspace - workspace
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

getNodeId

public NodeId getNodeId()
Return the node id.

Returns:
node id

isLock

public boolean isLock()
Return a flag indicating whether this is a lock or an unlock operation.

Returns:
true if this is a lock operation; false if this is an unlock operation

isDeep

public boolean isDeep()
Return a flag indicating whether the lock is deep.

Returns:
true if the lock is deep; false otherwise

getUserId

public String getUserId()
Deprecated. User getOwner() instead.

Return the user id associated with the lock operation.

Returns:
user id

getOwner

public String getOwner()
Return the lock owner associated with the lock operation.

Returns:
lock owner associated with the lock operation.


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