public interface OpLockDetails
Contains the main oplock details and type, and is also used to store a deferred file open request from another session during an oplock break.
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
|
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
|
int getLockType()
String getPath()
boolean isFolder()
boolean hasDeferredSessions()
int numberOfDeferredSessions()
int requeueDeferredRequests()
int failDeferredRequests()
long getOplockBreakTime()
boolean hasOplockBreakFailed()
boolean isRemoteLock()
void addDeferredSession(SMBSrvSession deferredSess, SMBSrvPacket deferredPkt) throws DeferFailedException
deferredSess
- SMBSrvSessiondeferredPkt
- SMBSrvPacketDeferFailedException
- If the session/packet cannot be deferredvoid updateDeferredPacketLease()
void setOplockBreakFailed()
void setOwnerFileId(int fileId)
fileId
- intvoid requestOpLockBreak() throws IOException
IOException
void setLockType(int lockTyp)
lockTyp
- intboolean hasBreakInProgress()
Copyright © 2005–2018 Alfresco Software. All rights reserved.