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

@@ -62,6 +62,7 @@ import org.alfresco.jlan.server.core.DeviceContext;
import org.alfresco.jlan.server.core.DeviceContextException;
import org.alfresco.jlan.server.core.ShareMapper;
import org.alfresco.jlan.server.core.ShareType;
import org.alfresco.jlan.server.filesys.DiskDeviceContext;
import org.alfresco.jlan.server.filesys.DiskSharedDevice;
import org.alfresco.jlan.server.filesys.FilesystemsConfigSection;
import org.alfresco.jlan.server.thread.ThreadRequestPool;
@@ -1559,6 +1560,17 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean
filesys = new DiskSharedDevice(filesystem.getDeviceName(), filesysDriver, (AVMContext)filesystem);
// Check if the filesystem uses the file state cache, if so then add to the file state reaper
DiskDeviceContext diskCtx = (DiskDeviceContext) filesystem;
if ( diskCtx.hasStateCache()) {
// Register the state cache with the reaper thread
fsysConfig.addFileStateCache( filesystem.getDeviceName(), diskCtx.getStateCache());
}
// Start the filesystem
((AVMContext)filesystem).startFilesystem(filesys);
@@ -1596,6 +1608,15 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean
filesys.setAccessControlList(acls);
// 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( filesystem.getDeviceName(), filesysContext.getStateCache());
}
// Start the filesystem
filesysContext.startFilesystem(filesys);
@@ -1647,7 +1668,7 @@ public class ServerConfigurationBean extends AbstractServerConfigurationBean
// 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