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(java.lang.String path)
Find the file state for the specified path
|
FileState |
findFileState(java.lang.String path,
boolean create)
Find the file state for the specified path, and optionally create a new file state if not
found
|
FileState |
findFileState(java.lang.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(java.lang.String path)
Remove the file state for the specified path
|
void |
renameFileState(java.lang.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(java.lang.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, stateCacheStartedpublic void initializeCache(org.springframework.extensions.config.ConfigElement config,
ServerConfiguration srvConfig)
throws InvalidConfigurationException
initializeCache in class FileStateCachesrvConfig - ServerConfigurationconfig - ConfigElementInvalidConfigurationExceptionpublic final int numberOfStates()
numberOfStates in class FileStateCachepublic final FileState findFileState(java.lang.String path)
findFileState in class FileStateCachepath - Stringpublic final FileState findFileState(java.lang.String path, boolean create)
findFileState in class FileStateCachepath - Stringcreate - booleanpublic final FileState findFileState(java.lang.String path, boolean create, int status)
findFileState in class FileStateCachepath - Stringcreate - booleanstatus - intpublic final FileState removeFileState(java.lang.String path)
removeFileState in class FileStateCachepath - Stringpublic final void renameFileState(java.lang.String newPath,
FileState state,
boolean isDir)
renameFileState in class FileStateCachenewPath - Stringstate - FileStateisDir - booleanpublic final void removeAllFileStates()
removeAllFileStates in class FileStateCachepublic final int removeExpiredFileStates()
removeExpiredFileStates in class FileStateCachepublic final void dumpCache(boolean dumpAttribs)
dumpCache in class FileStateCachedumpAttribs - booleanpublic void requestOplockBreak(java.lang.String path,
OpLockDetails oplock)
throws java.io.IOException
clNode - ClusterNodeclState - ClusterFileStatejava.io.IOExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.