public class HazelCastClusterFileState extends ClusterFileState
UpdateAllocSize, UpdateByteLock, UpdateChangeDate, UpdateFileSize, UpdateFileStatus, UpdateMaskCount, UpdateModifyDate, UpdateOpenCount, UpdateOplock, UpdateRetentionExpire, 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 |
---|
HazelCastClusterFileState()
Default constructor
|
HazelCastClusterFileState(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
|
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, setUpdateMask
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, isDirectory, isPermanentState, normalizePath, normalizePath, numberOfAttributes, numberOfLocks, removeAllAttributes, removeAttribute, removeLock, setExpiryTime, setFileStatus, setOpenCount, setPath, setPathInternal, setProcessId, setSharedAccess, updateAccessDateTime, updateChangeDateTime, updateModifyDateTime, upperCaseAToZ
public HazelCastClusterFileState()
public HazelCastClusterFileState(String fname, boolean caseSensitive)
fname
- StringcaseSensitive
- booleanpublic boolean isCopyState()
isCopyState
in class FileState
public 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 ClusterFileState
stateCache
- ClusterFileStateCachepublic void setOpLock(OpLockDetails oplock) throws ExistingOpLockException
setOpLock
in class FileState
oplock
- OpLockDetailsExistingOpLockException
- If there is an active oplock on this filepublic void setFileStatus(int status, int reason)
setFileStatus
in class FileState
status
- intreason
- intpublic void setFileSize(long fileSize)
setFileSize
in class FileState
fileSize
- longpublic void setAllocationSize(long allocSize)
setAllocationSize
in class FileState
allocSize
- longpublic void updateModifyDateTime(long modTime)
updateModifyDateTime
in class FileState
modTime
- longpublic void updateChangeDateTime(long changeTime)
updateChangeDateTime
in class FileState
changeTime
- longpublic void setRetentionExpiryDateTime(long expires)
setRetentionExpiryDateTime
in class FileState
expires
- 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 String toString()
toString
in class ClusterFileState
Copyright © 2005–2017 Alfresco Software. All rights reserved.