Class LockRecord
- java.lang.Object
-
- org.apache.jackrabbit.core.cluster.ClusterRecord
-
- 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
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddoRead()Deserialize this record.protected voiddoWrite()Serialize this record.NodeIdgetNodeId()Return the node id.StringgetOwner()Return the lock owner associated with the lock operation.StringgetUserId()Deprecated.UsergetOwner()instead.booleanisDeep()Return a flag indicating whether the lock is deep.booleanisLock()Return a flag indicating whether this is a lock or an unlock operation.voidprocess(ClusterRecordProcessor processor)Process this record, calling the appropriateprocessmethod.-
Methods inherited from class org.apache.jackrabbit.core.cluster.ClusterRecord
cancelUpdate, getRevision, getWorkspace, read, readEndMarker, update, write
-
-
-
-
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 idisDeep- flag indicating whether the lock is deeplockOwner- the name of the lock owner.record- journal recordworkspace- workspace
-
-
Method Detail
-
doRead
protected void doRead() throws JournalExceptionDeserialize this record. Subclass responsibility.- Specified by:
doReadin classClusterRecord- Throws:
JournalException- if an error occurs
-
doWrite
protected void doWrite() throws JournalExceptionSerialize this record. Subclass responsibility.- Specified by:
doWritein classClusterRecord- Throws:
JournalException- if an error occurs
-
process
public void process(ClusterRecordProcessor processor)
Process this record, calling the appropriateprocessmethod.- Specified by:
processin classClusterRecord- 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:
trueif this is a lock operation;falseif this is an unlock operation
-
isDeep
public boolean isDeep()
Return a flag indicating whether the lock is deep.- Returns:
trueif the lock is deep;falseotherwise
-
getUserId
@Deprecated public String getUserId()
Deprecated.UsergetOwner()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.
-
-