Refactor of the file state cache code. (Part 2 of 2).

Removed the repo specific file state cache code.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19949 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2010-04-22 12:16:04 +00:00
parent ebc24ad0e0
commit c18a123228
22 changed files with 287 additions and 2310 deletions

View File

@@ -1925,6 +1925,15 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean {
filesys = new DiskSharedDevice(filesysName, filesysDriver, filesysContext);
// Check if the filesystem uses the file state cache, if so then add to the file state reaper
if ( filesysContext.hasStateCache()) {
// Register the state cache with the reaper thread
fsysConfig.addFileStateCache( filesysName, filesysContext.getStateCache());
}
// Start the filesystem
filesysContext.startFilesystem(filesys);
@@ -1999,6 +2008,15 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean {
filesysContext.enableChangeHandler(changeNotify);
// Check if the filesystem uses the file state cache, if so then add to the file state reaper
if ( filesysContext.hasStateCache()) {
// Register the state cache with the reaper thread
fsysConfig.addFileStateCache( filesysName, filesysContext.getStateCache());
}
// Start the filesystem
filesysContext.startFilesystem(filesys);
@@ -2046,10 +2064,10 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean {
if ( fsysConfig.getShares().findShare( storeName, ShareType.DISK, true) == null)
{
// Create the new share for the store
// Create the new share for the store
AVMContext avmContext = new AVMContext( storeName, storeName + ":/", AVMContext.VERSION_HEAD);
avmContext.enableStateTable( true, avmDriver.getStateReaper());
avmContext.enableStateCache( true);
// Create the shared filesystem