public class StandaloneFileStateCache extends FileStateCache
Contains a cache of file/directory information for recently accessed files/directories to reduce the calls made by the core server code to the database.
DefaultExpireCheckInterval, DefaultFileStateExpireInterval, MinimumExpireCheckInterval, MinimumFileStateExpireInterval
Constructor and Description |
---|
StandaloneFileStateCache()
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dumpCache(boolean dumpAttribs)
Dump the state cache entries to the specified stream
|
FileState |
findFileState(String path)
Find the file state for the specified path
|
FileState |
findFileState(String path,
boolean create)
Find the file state for the specified path, and optionally create a new file state if not
found
|
FileState |
findFileState(String path,
boolean create,
int status)
Find the file state for the specified path, and optionally create a new file state if not
found with the specified initial status
|
void |
initializeCache(org.springframework.extensions.config.ConfigElement config,
ServerConfiguration srvConfig)
Initialize the file state cache
|
int |
numberOfStates()
Return the number of states in the cache
|
void |
removeAllFileStates()
Remove all file states from the cache
|
int |
removeExpiredFileStates()
Remove expired file states from the cache
|
FileState |
removeFileState(String path)
Remove the file state for the specified path
|
void |
renameFileState(String newPath,
FileState state,
boolean isDir)
Rename a file state, remove the existing entry, update the path and add the state back into
the cache using the new path.
|
void |
requestOplockBreak(String path,
OpLockDetails oplock)
Request an oplock break
|
addLock, addOpLock, addStateCacheListener, addStateListener, changeOpLockType, clearOpLock, createFileLockObject, getCheckInterval, getFileStateExpireInterval, getFileStateProxy, getOpLock, getStateCacheListener, getStateListener, grantFileAccess, hasActiveLocks, hasDebug, hasDebugExpiredStates, hasDumpOnShutdown, hasStateCacheListener, hasStateListener, isCaseSensitive, isClusteredCache, releaseFileAccess, removeLock, removeStateCacheListener, removeStateListener, requestOplockBreak, setCaseSensitive, setCheckInterval, setDataUpdateCompleted, setDataUpdateInProgress, setDebug, setDebugExpiredStates, setDriverDetails, setDumpOnShutdown, setFileStateExpireInterval, stateCacheShuttingDown, stateCacheStarted
public void initializeCache(org.springframework.extensions.config.ConfigElement config, ServerConfiguration srvConfig) throws InvalidConfigurationException
initializeCache
in class FileStateCache
srvConfig
- ServerConfigurationconfig
- ConfigElementInvalidConfigurationException
public final int numberOfStates()
numberOfStates
in class FileStateCache
public final FileState findFileState(String path)
findFileState
in class FileStateCache
path
- Stringpublic final FileState findFileState(String path, boolean create)
findFileState
in class FileStateCache
path
- Stringcreate
- booleanpublic final FileState findFileState(String path, boolean create, int status)
findFileState
in class FileStateCache
path
- Stringcreate
- booleanstatus
- intpublic final FileState removeFileState(String path)
removeFileState
in class FileStateCache
path
- Stringpublic final void renameFileState(String newPath, FileState state, boolean isDir)
renameFileState
in class FileStateCache
newPath
- Stringstate
- FileStateisDir
- booleanpublic final void removeAllFileStates()
removeAllFileStates
in class FileStateCache
public final int removeExpiredFileStates()
removeExpiredFileStates
in class FileStateCache
public final void dumpCache(boolean dumpAttribs)
dumpCache
in class FileStateCache
dumpAttribs
- booleanpublic void requestOplockBreak(String path, OpLockDetails oplock) throws IOException
path
- Stringoplock
- OpLockDetailsIOException
Copyright © 2005–2017 Alfresco Software. All rights reserved.