public class OpLockDetailsAdapter extends 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
|
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 OpLockDetails
public String getPath()
getPath
in interface OpLockDetails
public boolean isFolder()
isFolder
in interface OpLockDetails
public boolean hasDeferredSessions()
hasDeferredSessions
in interface OpLockDetails
public int numberOfDeferredSessions()
numberOfDeferredSessions
in interface OpLockDetails
public int requeueDeferredRequests()
requeueDeferredRequests
in interface OpLockDetails
public int failDeferredRequests()
failDeferredRequests
in interface OpLockDetails
public long getOplockBreakTime()
getOplockBreakTime
in interface OpLockDetails
public boolean hasOplockBreakFailed()
hasOplockBreakFailed
in interface OpLockDetails
public boolean isRemoteLock()
isRemoteLock
in interface OpLockDetails
public void addDeferredSession(SMBSrvSession deferredSess, SMBSrvPacket deferredPkt) throws DeferFailedException
addDeferredSession
in interface OpLockDetails
deferredSess
- SMBSrvSessiondeferredPkt
- SMBSrvPacketDeferFailedException
- If the session/packet cannot be deferredpublic void updateDeferredPacketLease()
updateDeferredPacketLease
in interface OpLockDetails
public void setOplockBreakFailed()
setOplockBreakFailed
in interface OpLockDetails
public void setOwnerFileId(int fileId)
setOwnerFileId
in interface OpLockDetails
fileId
- intpublic void requestOpLockBreak() throws IOException
requestOpLockBreak
in interface OpLockDetails
IOException
public void setLockType(int lockTyp)
setLockType
in interface OpLockDetails
lockTyp
- intpublic boolean hasBreakInProgress()
hasBreakInProgress
in interface OpLockDetails
Copyright © 2005–2018 Alfresco Software. All rights reserved.