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 OpLockDetailsgetLockType in class OpLockDetailsAdapterpublic 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 OpLockDetailsgetPath in class OpLockDetailsAdapterpublic boolean isFolder()
isFolder in interface OpLockDetailsisFolder in class OpLockDetailsAdapterpublic long getOplockBreakTime()
getOplockBreakTime in interface OpLockDetailsgetOplockBreakTime in class OpLockDetailsAdapterpublic boolean hasOplockBreakFailed()
hasOplockBreakFailed in interface OpLockDetailshasOplockBreakFailed in class OpLockDetailsAdapterpublic boolean isRemoteLock()
isRemoteLock in interface OpLockDetailsisRemoteLock in class OpLockDetailsAdapterpublic final void setOwnerFileId(int fileId)
setOwnerFileId in interface OpLockDetailssetOwnerFileId in class OpLockDetailsAdapterfileId - intpublic final void setOplockBreakFailed()
setOplockBreakFailed in interface OpLockDetailssetOplockBreakFailed in class OpLockDetailsAdapterpublic void setLockType(int lockTyp)
setLockType in interface OpLockDetailssetLockType in class OpLockDetailsAdapterlockTyp - intpublic boolean hasDeferredSessions()
hasDeferredSessions in interface OpLockDetailshasDeferredSessions in class OpLockDetailsAdapterpublic int numberOfDeferredSessions()
numberOfDeferredSessions in interface OpLockDetailsnumberOfDeferredSessions in class OpLockDetailsAdapterpublic int requeueDeferredRequests()
requeueDeferredRequests in interface OpLockDetailsrequeueDeferredRequests in class OpLockDetailsAdapterpublic int failDeferredRequests()
failDeferredRequests in interface OpLockDetailsfailDeferredRequests 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 void requestOpLockBreak()
throws java.io.IOException
requestOpLockBreak in interface OpLockDetailsrequestOpLockBreak in class OpLockDetailsAdapterjava.io.IOExceptionpublic boolean hasBreakInProgress()
hasBreakInProgress in interface OpLockDetailshasBreakInProgress in class OpLockDetailsAdapterpublic void finalize()
finalize in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.