public class RemoteOpLockDetails extends OpLockDetailsAdapter implements java.io.Serializable
Contains the oplock details that need to be stored in the cluster cache, the actual oplock details will be stored locally on the node that owns the oplock.
| Modifier | Constructor and Description |
|---|---|
|
RemoteOpLockDetails()
Default constructor
|
protected |
RemoteOpLockDetails(ClusterNode clNode,
int lockTyp,
java.lang.String path,
ClusterFileStateCache stateCache)
Class constructor
|
protected |
RemoteOpLockDetails(ClusterNode clNode,
OpLockDetails localOpLock,
ClusterFileStateCache stateCache)
Class constructor
|
protected |
RemoteOpLockDetails(java.lang.String ownerName,
int lockTyp,
java.lang.String path,
ClusterFileStateCache stateCache)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeferredSession(SMBSrvSession deferredSess,
SMBSrvPacket deferredPkt)
Add a deferred session/packet, whilst an oplock break is in progress
|
int |
failDeferredRequests()
Fail any deferred requests that are attached to this oplock, and clear the deferred list
|
int |
getLockType()
Return the oplock type
|
long |
getOplockBreakTime()
Return the time that the oplock break was sent to the client
|
java.lang.String |
getOwnerName()
Return the owner name
|
java.lang.String |
getPath()
Return the share relative path of the locked file
|
ClusterFileStateCache |
getStateCache()
Get the state cache that this state belongs to
|
boolean |
hasDeferredSessions()
Check if there is a deferred session attached to the oplock, this indicates an oplock break is
in progress for this oplock.
|
boolean |
hasOplockBreakFailed()
Check if this oplock is still valid, or an oplock break has failed
|
boolean |
isRemoteLock()
Check if this is a remote oplock
|
int |
numberOfDeferredSessions()
Return the count of deferred requests
|
void |
requestOpLockBreak()
Request an oplock break
|
int |
requeueDeferredRequests()
Requeue deferred requests to the thread pool for processing, oplock has been released
|
void |
setLockType(int lockTyp)
Set the lock type
|
void |
setOplockBreakFailed()
Set the failed oplock break flag, to indicate the client did not respond to the oplock break
request within a reasonable time.
|
void |
setStateCache(ClusterFileStateCache stateCache)
Set the state cache that this state belongs to
|
java.lang.String |
toString()
Return the remote oplock as a string
|
void |
updateDeferredPacketLease()
Update the deferred packet lease time(s) as we wait for an oplock break or timeout
|
hasBreakInProgress, isFolder, setOwnerFileIdpublic RemoteOpLockDetails()
protected RemoteOpLockDetails(ClusterNode clNode, int lockTyp, java.lang.String path, ClusterFileStateCache stateCache)
clNode - ClusterNodelockTyp - intpath - StringstateCache - ClusterFileStateCacheprotected RemoteOpLockDetails(ClusterNode clNode, OpLockDetails localOpLock, ClusterFileStateCache stateCache)
clNode - ClusterNodelocalOplock - OpLockDetailsstateCache - ClusterFileStateCacheprotected RemoteOpLockDetails(java.lang.String ownerName,
int lockTyp,
java.lang.String path,
ClusterFileStateCache stateCache)
ownerName - StringlockTyp - intpath - StringstateCache - ClusterFileStateCachepublic int getLockType()
getLockType in interface OpLockDetailsgetLockType in class OpLockDetailsAdapterpublic final java.lang.String getOwnerName()
public java.lang.String getPath()
getPath in interface OpLockDetailsgetPath in class OpLockDetailsAdapterpublic boolean isRemoteLock()
isRemoteLock in interface OpLockDetailsisRemoteLock in class OpLockDetailsAdapterpublic void requestOpLockBreak()
throws java.io.IOException
requestOpLockBreak in interface OpLockDetailsrequestOpLockBreak in class OpLockDetailsAdapterjava.io.IOExceptionpublic boolean hasDeferredSessions()
hasDeferredSessions in interface OpLockDetailshasDeferredSessions in class OpLockDetailsAdapterpublic int numberOfDeferredSessions()
numberOfDeferredSessions in interface OpLockDetailsnumberOfDeferredSessions in class OpLockDetailsAdapterpublic void addDeferredSession(SMBSrvSession deferredSess, SMBSrvPacket deferredPkt) throws DeferFailedException
addDeferredSession in interface OpLockDetailsaddDeferredSession in class OpLockDetailsAdapterdeferredSess - SMBSrvSessiondeferredPkt - SMBSrvPacketDeferFailedException - If the session/packet cannot be deferredpublic void updateDeferredPacketLease()
updateDeferredPacketLease in interface OpLockDetailsupdateDeferredPacketLease in class OpLockDetailsAdapterpublic int requeueDeferredRequests()
requeueDeferredRequests in interface OpLockDetailsrequeueDeferredRequests in class OpLockDetailsAdapterpublic int failDeferredRequests()
failDeferredRequests in interface OpLockDetailsfailDeferredRequests in class OpLockDetailsAdapterpublic long getOplockBreakTime()
getOplockBreakTime in interface OpLockDetailsgetOplockBreakTime in class OpLockDetailsAdapterpublic boolean hasOplockBreakFailed()
hasOplockBreakFailed in interface OpLockDetailshasOplockBreakFailed in class OpLockDetailsAdapterpublic void setOplockBreakFailed()
setOplockBreakFailed in interface OpLockDetailssetOplockBreakFailed in class OpLockDetailsAdapterpublic final ClusterFileStateCache getStateCache()
public final void setStateCache(ClusterFileStateCache stateCache)
stateCache - ClusterFileStateCachepublic void setLockType(int lockTyp)
setLockType in interface OpLockDetailssetLockType in class OpLockDetailsAdapterlockTyp - intpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.