public abstract class ClusterFileState extends FileState implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
UpdateAllocSize |
static int |
UpdateByteLock |
static int |
UpdateChangeDate |
static int |
UpdateFileSize |
static int |
UpdateFileStatus |
static int |
UpdateMaskCount |
static int |
UpdateModifyDate |
static int |
UpdateOpenCount |
static int |
UpdateOplock |
static int |
UpdateRetentionExpire |
static int |
UpdateSharingMode |
DefTimeout, DeleteTimeout, FILE_AVAILABLE, FILE_DELETED, FILE_DELETEONCLOSE, FILE_LOADING, FILE_LOADWAIT, FILE_RENAMED, FILE_SAVED, FILE_SAVEWAIT, FILE_SAVING, FILE_UPDATED, FileInformation, NoTimeout, ReasonFileCreated, ReasonFileDeleted, ReasonFolderCreated, ReasonFolderDeleted, ReasonNone, RenameTimeout, StreamsList, UnknownFileId
Constructor and Description |
---|
ClusterFileState()
Default constructor
|
ClusterFileState(java.lang.String fname,
boolean caseSensitive)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canReadFile(long offset,
long len,
int pid)
Check if the file is readable for the specified section of the file and process id
|
boolean |
canWriteFile(long offset,
long len,
int pid)
Check if the file is writeable for the specified section of the file and process id
|
void |
clearLocalOpLock()
Clear the oplock
|
int |
clearPendingUpdates()
Clear the pending updates flags and return the current update mask value
|
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
|
java.lang.Object |
getDataUpdateNode()
Return the data update node details, or null if no data update is in progress
|
int |
getFileId()
Get the file id
|
java.lang.Object |
getFilesystemObject()
Return the filesystem object
|
LocalOpLockDetails |
getLocalOpLock()
Return the local oplock details
|
OpLockDetails |
getOpLock()
Return the oplock details
|
int |
getPendingUpdates()
Return the pending updates mask
|
java.lang.Object |
getPrimaryOwner()
Return the primary owner
|
protected PseudoFileList |
getPseudoFileList(boolean createList)
Return the pseudo file list, optionally create a new list
|
protected ClusterFileStateCache |
getStateCache()
Get the state cache that this state belongs to
|
int |
getStatusChangeReason()
Return the file status change reason code
|
static java.lang.String |
getUpdateMaskAsString(int updMask)
Return the update mask as a string
|
boolean |
hasDataUpdateInProgress()
Check if there is a data update in progress for this file
|
boolean |
hasLocalOpLock()
Check if the file has an active local oplock
|
boolean |
hasPrimaryOwner()
Check if there is a primary owner
|
void |
setDataStatus(int sts)
Set the file data status
|
void |
setDataUpdateNode(java.lang.Object updateNode)
Set the data update node details
|
void |
setFileId(int id)
Set the file identifier
|
void |
setFileStatusInternal(int fSts,
int reason)
Set the file status value, internal method
|
void |
setFilesystemObject(java.lang.Object filesysObj)
Set the filesystem object
|
void |
setLocalOpLock(LocalOpLockDetails oplock)
Set the oplock for this file
|
void |
setNormalizedPath(java.lang.String path)
Set the path using an already normalized path string
|
void |
setPrimaryOwner(java.lang.Object priOwner)
Set the primary owner, only if the file open count is currently zero
|
void |
setStateCache(ClusterFileStateCache stateCache)
Set the state cache that this state belongs to
|
void |
setStatusChangeReason(int reason)
Set the file status change reason code
|
void |
setUpdateMask(int updMask)
Set the update mask
|
java.lang.String |
toString()
Return the file state as a string
|
addAttribute, addLock, addPseudoFile, allowsOpen, clearOpLock, decrementOpenCount, DumpAttributes, exists, fileExists, findAttribute, getAccessDateTime, getAllocationSize, getChangeDateTime, getChangeReasonString, getFileSize, getFileStatus, getLockList, getModifyDateTime, getOpenCount, getPath, getProcessId, getPseudoFileList, getRetentionExpiryDateTime, getSecondsToExpire, getSharedAccess, getStatusAsString, hasAccessDateTime, hasActiveLocks, hasActiveRetentionPeriod, hasAllocationSize, hasChangeDateTime, hasExpired, hasFileSize, hasFilesystemObject, hasModifyDateTime, hasOpLock, hasPseudoFiles, incrementOpenCount, isCopyState, isDirectory, isPermanentState, normalizePath, normalizePath, numberOfAttributes, numberOfLocks, removeAllAttributes, removeAttribute, removeLock, setAllocationSize, setExpiryTime, setFileSize, setFileStatus, setFileStatus, setOpenCount, setOpLock, setPath, setPathInternal, setProcessId, setRetentionExpiryDateTime, setSharedAccess, updateAccessDateTime, updateChangeDateTime, updateChangeDateTime, updateModifyDateTime, updateModifyDateTime, upperCaseAToZ
public static final int UpdateOplock
public static final int UpdateSharingMode
public static final int UpdateByteLock
public static final int UpdateFileStatus
public static final int UpdateChangeDate
public static final int UpdateModifyDate
public static final int UpdateFileSize
public static final int UpdateAllocSize
public static final int UpdateOpenCount
public static final int UpdateRetentionExpire
public static final int UpdateMaskCount
public ClusterFileState()
public ClusterFileState(java.lang.String fname, boolean caseSensitive)
fname
- StringcaseSensitive
- booleanpublic OpLockDetails getOpLock()
public final java.lang.Object getPrimaryOwner()
public final boolean hasPrimaryOwner()
public final void setPrimaryOwner(java.lang.Object priOwner)
priOwner
- Objectpublic final void setNormalizedPath(java.lang.String path)
path
- Stringprotected final ClusterFileStateCache getStateCache()
public void setStateCache(ClusterFileStateCache stateCache)
stateCache
- ClusterFileStateCachepublic int getFileId()
public void setFileId(int id)
public int getDataStatus()
getDataStatus
in class FileState
public void setDataStatus(int sts)
setDataStatus
in class FileState
sts
- intprotected java.util.HashMap getAttributeMap(boolean createMap)
getAttributeMap
in class FileState
createMap
- booleanprotected PseudoFileList getPseudoFileList(boolean createList)
getPseudoFileList
in class FileState
createList
- booleanpublic java.lang.Object getFilesystemObject()
getFilesystemObject
in class FileState
public void setFilesystemObject(java.lang.Object filesysObj)
setFilesystemObject
in class FileState
filesysObj
- Objectpublic boolean hasLocalOpLock()
public LocalOpLockDetails getLocalOpLock()
public void setLocalOpLock(LocalOpLockDetails oplock) throws ExistingOpLockException
oplock
- LocalOpLockDetailsExistingOpLockException
- If there is an active oplock on this filepublic void clearLocalOpLock()
public boolean canReadFile(long offset, long len, int pid)
canReadFile
in class FileState
offset
- longlen
- longpid
- intpublic boolean canWriteFile(long offset, long len, int pid)
canWriteFile
in class FileState
offset
- longlen
- longpid
- intpublic final int getPendingUpdates()
public final int clearPendingUpdates()
public final void setUpdateMask(int updMask)
updMask
- intpublic final void setFileStatusInternal(int fSts, int reason)
fSts
- intreason
- intpublic final int getStatusChangeReason()
public final void setStatusChangeReason(int reason)
reason
- intpublic boolean hasDataUpdateInProgress()
hasDataUpdateInProgress
in class FileState
public java.lang.Object getDataUpdateNode()
public void setDataUpdateNode(java.lang.Object updateNode)
updateNode
- Objectpublic static final java.lang.String getUpdateMaskAsString(int updMask)
updMask
- intCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.