public class PerNodeState
extends java.lang.Object
Contains per node values for a file state that cannot be stored within the cluster cache or have per node values which cannot be shared.
Modifier and Type | Field and Description |
---|---|
static int |
MaxDeferredRequests |
Constructor and Description |
---|
PerNodeState()
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
|
void |
clearOpLock()
Clear the oplock
|
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
|
protected java.util.HashMap |
getAttributeMap(boolean createMap)
Return the map of additional attribute objects attached to this file state, and
optionally create the map if it does not exist
|
int |
getDataStatus()
Return the file data status
|
int |
getFileId()
Get the file id
|
java.lang.Object |
getFilesystemObject()
Return the filesystem object
|
LocalOpLockDetails |
getOpLock()
Return the oplock details
|
long |
getOplockBreakTime()
Return the oplock break time
|
protected PseudoFileList |
getPseudoFileList(boolean createList)
Return the pseudo file list
|
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 |
hasOpLock()
Check if the file has an active oplock
|
boolean |
hasPseudoFiles()
Determine if a folder has pseudo files associated with it
|
int |
numberOfDeferredSessions()
Return the count of deferred requests
|
void |
remoteAllAttributes()
Clear the attributes
|
int |
requeueDeferredRequests()
Requeue deferred requests to the thread pool for processing, oplock has been released
|
void |
setDataStatus(int sts)
Set the file data status
|
void |
setFileId(int id)
Set the file identifier
|
void |
setFilesystemObject(java.lang.Object filesysObj)
Set the filesystem object
|
void |
setOpLock(LocalOpLockDetails oplock)
Set the oplock for this file
|
java.lang.String |
toString()
Return the per node state 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 int getFileId()
public int getDataStatus()
public void setFileId(int id)
id
- intpublic void setDataStatus(int sts)
sts
- intpublic boolean hasPseudoFiles()
protected PseudoFileList getPseudoFileList(boolean createList)
createList
- booleanpublic java.lang.Object getFilesystemObject()
public void setFilesystemObject(java.lang.Object filesysObj)
filesysObj
- Objectprotected java.util.HashMap getAttributeMap(boolean createMap)
createMap
- booleanpublic final void remoteAllAttributes()
public boolean hasOpLock()
public LocalOpLockDetails getOpLock()
public void setOpLock(LocalOpLockDetails oplock) throws ExistingOpLockException
oplock
- LocalOpLockDetailsExistingOpLockException
- If there is an active oplock on this filepublic void clearOpLock()
public boolean hasDeferredSessions()
public int numberOfDeferredSessions()
public int requeueDeferredRequests()
public int failDeferredRequests()
public void addDeferredSession(SMBSrvSession deferredSess, SMBSrvPacket deferredPkt) throws DeferFailedException
deferredSess
- SMBSrvSessiondeferredPkt
- SMBSrvPacketDeferFailedException
- If the session/packet cannot be deferredpublic void updateDeferredPacketLease()
public final long getOplockBreakTime()
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.