public class OpLockDetailsAdapter extends java.lang.Object implements OpLockDetails
| Constructor and Description |
|---|
OpLockDetailsAdapter()
Default 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 |
getPath()
Return the share relative path of the locked file
|
boolean |
hasBreakInProgress()
Check if there is an oplock break in progress for this oplock
|
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 |
isFolder()
Check if the oplock is on a file or folder
|
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 |
setOwnerFileId(int fileId)
Set the owner file id
|
void |
updateDeferredPacketLease()
Update the deferred packet lease time(s) as we wait for an oplock break or timeout
|
public int getLockType()
getLockType in interface OpLockDetailspublic java.lang.String getPath()
getPath in interface OpLockDetailspublic boolean isFolder()
isFolder in interface OpLockDetailspublic boolean hasDeferredSessions()
hasDeferredSessions in interface OpLockDetailspublic int numberOfDeferredSessions()
numberOfDeferredSessions in interface OpLockDetailspublic int requeueDeferredRequests()
requeueDeferredRequests in interface OpLockDetailspublic int failDeferredRequests()
failDeferredRequests in interface OpLockDetailspublic long getOplockBreakTime()
getOplockBreakTime in interface OpLockDetailspublic boolean hasOplockBreakFailed()
hasOplockBreakFailed in interface OpLockDetailspublic boolean isRemoteLock()
isRemoteLock in interface OpLockDetailspublic void addDeferredSession(SMBSrvSession deferredSess, SMBSrvPacket deferredPkt) throws DeferFailedException
addDeferredSession in interface OpLockDetailsdeferredSess - SMBSrvSessiondeferredPkt - SMBSrvPacketDeferFailedException - If the session/packet cannot be deferredpublic void updateDeferredPacketLease()
updateDeferredPacketLease in interface OpLockDetailspublic void setOplockBreakFailed()
setOplockBreakFailed in interface OpLockDetailspublic void setOwnerFileId(int fileId)
setOwnerFileId in interface OpLockDetailsfileId - intpublic void requestOpLockBreak()
throws java.io.IOException
requestOpLockBreak in interface OpLockDetailsjava.io.IOExceptionpublic void setLockType(int lockTyp)
setLockType in interface OpLockDetailslockTyp - intpublic boolean hasBreakInProgress()
hasBreakInProgress in interface OpLockDetailsCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.