public class HazelCastClusterFileState extends ClusterFileState
UpdateAllocSize, UpdateByteLock, UpdateChangeDate, UpdateFileSize, UpdateFileStatus, UpdateMaskCount, UpdateModifyDate, UpdateOpenCount, UpdateOplock, UpdateRetentionExpire, UpdateSharingModeDefTimeout, 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 |
|---|
HazelCastClusterFileState()
Default constructor
|
HazelCastClusterFileState(java.lang.String fname,
boolean caseSensitive)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyNearCacheDetails(HazelCastClusterFileState hcState)
Copy near-cache details to a new copy of the file state
|
long |
getNearCacheHitCount()
Return the near-cache hit counter
|
long |
getNearCacheLastAccessTime()
Return the time the near-cache entry was last accessed
|
long |
getNearCacheTime()
Return the time the state was added to the near-cache
|
long |
getNearRemoteUpdateTime()
Return the time the state was last updated remotely
|
long |
incrementNearCacheHitCount()
Increment the near-cache hit counter
|
boolean |
isCopyState()
Check if this is a copy file state, or the master file state object
|
boolean |
isStateValid()
Check if the near-cache entry is valid
|
protected void |
queueLowPriorityUpdate(int updateMask)
Queue a low priority update for this file state
|
protected void |
runHighPriorityUpdate(int updateMask)
Run a high priority update for this file state
|
void |
setAllocationSize(long allocSize)
Set the allocation size
|
void |
setFileSize(long fileSize)
Set the file size
|
void |
setFileStatus(int status,
int reason)
Set the file status (not exist, file exists, folder exists)
|
void |
setNearCacheTime()
Set the time the state was added to the near-cache
|
void |
setNearRemoteUpdateTime()
Set the remote update time for a near-cached state
|
void |
setNearRemoteUpdateTime(long updateTime)
Set the remote update time for a near-cached state
|
void |
setOpLock(OpLockDetails oplock)
Set the oplock for this file
|
void |
setRetentionExpiryDateTime(long expires)
Set the retention period expiry date/time
|
void |
setStateCache(ClusterFileStateCache stateCache)
Set the state cache that this state belongs to
|
void |
setStateValid(boolean nearValid)
Set the near-cache entry valid flag
|
java.lang.String |
toString()
Return the file state as a string
|
void |
updateChangeDateTime(long changeTime)
Update the change date/time
|
void |
updateModifyDateTime(long modTime)
Update the modify date/time
|
protected void |
updateState(StateUpdateMessage updateMsg)
Update the file state from values in the update message
|
canReadFile, canWriteFile, clearLocalOpLock, clearPendingUpdates, getAttributeMap, getDataStatus, getDataUpdateNode, getFileId, getFilesystemObject, getLocalOpLock, getOpLock, getPendingUpdates, getPrimaryOwner, getPseudoFileList, getStateCache, getStatusChangeReason, getUpdateMaskAsString, hasDataUpdateInProgress, hasLocalOpLock, hasPrimaryOwner, setDataStatus, setDataUpdateNode, setFileId, setFileStatusInternal, setFilesystemObject, setLocalOpLock, setNormalizedPath, setPrimaryOwner, setStatusChangeReason, setUpdateMaskaddAttribute, 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, isDirectory, isPermanentState, normalizePath, normalizePath, numberOfAttributes, numberOfLocks, removeAllAttributes, removeAttribute, removeLock, setExpiryTime, setFileStatus, setOpenCount, setPath, setPathInternal, setProcessId, setSharedAccess, updateAccessDateTime, updateChangeDateTime, updateModifyDateTime, upperCaseAToZpublic HazelCastClusterFileState()
public HazelCastClusterFileState(java.lang.String fname,
boolean caseSensitive)
fname - StringcaseSensitive - booleanpublic boolean isCopyState()
isCopyState in class FileStatepublic final long getNearCacheTime()
public final long getNearCacheHitCount()
public final long getNearCacheLastAccessTime()
public final long getNearRemoteUpdateTime()
public final boolean isStateValid()
public void setStateCache(ClusterFileStateCache stateCache)
setStateCache in class ClusterFileStatestateCache - ClusterFileStateCachepublic void setOpLock(OpLockDetails oplock) throws ExistingOpLockException
setOpLock in class FileStateoplock - OpLockDetailsExistingOpLockException - If there is an active oplock on this filepublic void setFileStatus(int status,
int reason)
setFileStatus in class FileStatestatus - intreason - intpublic void setFileSize(long fileSize)
setFileSize in class FileStatefileSize - longpublic void setAllocationSize(long allocSize)
setAllocationSize in class FileStateallocSize - longpublic void updateModifyDateTime(long modTime)
updateModifyDateTime in class FileStatemodTime - longpublic void updateChangeDateTime(long changeTime)
updateChangeDateTime in class FileStatechangeTime - longpublic void setRetentionExpiryDateTime(long expires)
setRetentionExpiryDateTime in class FileStateexpires - longpublic final void setNearCacheTime()
public final void setNearRemoteUpdateTime()
public final void setNearRemoteUpdateTime(long updateTime)
updateTime - longpublic final long incrementNearCacheHitCount()
public final void setStateValid(boolean nearValid)
nearValid - booleanprotected final void copyNearCacheDetails(HazelCastClusterFileState hcState)
hcState - HazelCastClusterFileStateprotected void queueLowPriorityUpdate(int updateMask)
updateMask - intprotected void runHighPriorityUpdate(int updateMask)
updateMask - intprotected final void updateState(StateUpdateMessage updateMsg)
updateMsg - StateUpdateMessagepublic java.lang.String toString()
toString in class ClusterFileStateCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.