mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user