public class LocalOpLockDetails extends OpLockDetailsAdapter
Contains the details of an oplock that is owned by a session on the local node.
Modifier and Type | Field and Description |
---|---|
static int |
MaxDeferredRequests |
Constructor and Description |
---|
LocalOpLockDetails(int lockTyp,
java.lang.String path,
SMBSrvSession sess,
int pid,
int treeId,
boolean folder)
Class constructor
|
LocalOpLockDetails(int lockTyp,
java.lang.String path,
SMBSrvSession sess,
int pid,
int uid,
int treeId,
int fileId,
boolean folder)
Class constructor
|
LocalOpLockDetails(int lockTyp,
java.lang.String path,
SMBSrvSession sess,
SMBSrvPacket pkt,
boolean folder)
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
|
void |
finalize()
Finalize, check if there are any deferred requests in the list
|
int |
getLockType()
Return the oplock type
|
long |
getOplockBreakTime()
Return the time that the oplock break was sent to the client
|
int |
getOwnerFileId()
Return the owner file id (FID)
|
int |
getOwnerPID()
Return the owner process id
|
SMBSrvSession |
getOwnerSession()
Return the lock owner session
|
int |
getOwnerTreeId()
Return the owner tree id
|
int |
getOwnerUID()
Return the owner virtual circuit id/UID
|
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
|
java.lang.String |
toString()
Return the oplock details as a string
|
void |
updateDeferredPacketLease()
Update the deferred packet lease time(s) as we wait for an oplock break or timeout
|
public static final int MaxDeferredRequests
public LocalOpLockDetails(int lockTyp, java.lang.String path, SMBSrvSession sess, int pid, int uid, int treeId, int fileId, boolean folder)
lockTyp
- intpath
- Stringsess
- SMBSrvSessionpid
- intuid
- inttreeId
- intfileId
- intfolder
- booleanpublic LocalOpLockDetails(int lockTyp, java.lang.String path, SMBSrvSession sess, SMBSrvPacket pkt, boolean folder)
lockTyp
- intpath
- Stringsess
- SMBSrvSessionpkt
- SMBSrvPacketfolder
- booleanpublic LocalOpLockDetails(int lockTyp, java.lang.String path, SMBSrvSession sess, int pid, int treeId, boolean folder)
lockTyp
- intpath
- Stringsess
- SMBSrvSessionpid
- inttreeId
- intfolder
- booleanpublic int getLockType()
getLockType
in interface OpLockDetails
getLockType
in class OpLockDetailsAdapter
public SMBSrvSession getOwnerSession()
public final int getOwnerPID()
public final int getOwnerUID()
public final int getOwnerTreeId()
public final int getOwnerFileId()
public java.lang.String getPath()
getPath
in interface OpLockDetails
getPath
in class OpLockDetailsAdapter
public boolean isFolder()
isFolder
in interface OpLockDetails
isFolder
in class OpLockDetailsAdapter
public long getOplockBreakTime()
getOplockBreakTime
in interface OpLockDetails
getOplockBreakTime
in class OpLockDetailsAdapter
public boolean hasOplockBreakFailed()
hasOplockBreakFailed
in interface OpLockDetails
hasOplockBreakFailed
in class OpLockDetailsAdapter
public boolean isRemoteLock()
isRemoteLock
in interface OpLockDetails
isRemoteLock
in class OpLockDetailsAdapter
public final void setOwnerFileId(int fileId)
setOwnerFileId
in interface OpLockDetails
setOwnerFileId
in class OpLockDetailsAdapter
fileId
- intpublic final void setOplockBreakFailed()
setOplockBreakFailed
in interface OpLockDetails
setOplockBreakFailed
in class OpLockDetailsAdapter
public void setLockType(int lockTyp)
setLockType
in interface OpLockDetails
setLockType
in class OpLockDetailsAdapter
lockTyp
- intpublic boolean hasDeferredSessions()
hasDeferredSessions
in interface OpLockDetails
hasDeferredSessions
in class OpLockDetailsAdapter
public int numberOfDeferredSessions()
numberOfDeferredSessions
in interface OpLockDetails
numberOfDeferredSessions
in class OpLockDetailsAdapter
public int requeueDeferredRequests()
requeueDeferredRequests
in interface OpLockDetails
requeueDeferredRequests
in class OpLockDetailsAdapter
public int failDeferredRequests()
failDeferredRequests
in interface OpLockDetails
failDeferredRequests
in class OpLockDetailsAdapter
public void addDeferredSession(SMBSrvSession deferredSess, SMBSrvPacket deferredPkt) throws DeferFailedException
addDeferredSession
in interface OpLockDetails
addDeferredSession
in class OpLockDetailsAdapter
deferredSess
- SMBSrvSessiondeferredPkt
- SMBSrvPacketDeferFailedException
- If the session/packet cannot be deferredpublic void updateDeferredPacketLease()
updateDeferredPacketLease
in interface OpLockDetails
updateDeferredPacketLease
in class OpLockDetailsAdapter
public void requestOpLockBreak() throws java.io.IOException
requestOpLockBreak
in interface OpLockDetails
requestOpLockBreak
in class OpLockDetailsAdapter
java.io.IOException
public boolean hasBreakInProgress()
hasBreakInProgress
in interface OpLockDetails
hasBreakInProgress
in class OpLockDetailsAdapter
public void finalize()
finalize
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.