EHCache upgrade.

- some minor API changes
 - Spring and Hibernate share same CacheManagerFactory now.  This allows overridable config
 - Moved EHCache config files down into config/alfresco

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2521 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-03-07 15:34:17 +00:00
parent f64119ac90
commit 2cf407613a
7 changed files with 223 additions and 33 deletions

View File

@@ -26,8 +26,8 @@ import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheException;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
import net.sf.ehcache.Status;
import org.alfresco.error.AlfrescoRuntimeException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Job;
@@ -115,7 +115,7 @@ public class EhCacheTracerJob implements Job
public CacheAnalysis(Cache cache) throws CacheException
{
this.cache = cache;
if (this.cache.getStatus() == Cache.STATUS_ALIVE)
if (this.cache.getStatus().equals(Status.STATUS_ALIVE))
{
try
{
@@ -166,21 +166,6 @@ public class EhCacheTracerJob implements Job
}
}
public String getStatusStr()
{
switch (cache.getStatus())
{
case Cache.STATUS_ALIVE:
return "ALIVE";
case Cache.STATUS_DISPOSED:
return "DISPOSED";
case Cache.STATUS_UNINITIALISED:
return "UNINITIALIZED";
default:
throw new AlfrescoRuntimeException("Unknown cache status: " + cache.getStatus());
}
}
public String toString()
{
double sizeMB = (double)getSize()/1024.0/1024.0;