[exo-jcr-commits] exo-jcr SVN: r1312 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Jan 6 06:11:39 EST 2010
Author: areshetnyak
Date: 2010-01-06 06:11:39 -0500 (Wed, 06 Jan 2010)
New Revision: 1312
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java
Log:
EXOJCR-333 : The ExoEvictionActionPolicy was changed.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java 2010-01-06 10:44:51 UTC (rev 1311)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/ChildListEvictionActionPolicy.java 2010-01-06 11:11:39 UTC (rev 1312)
@@ -19,6 +19,7 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.jboss.cache.Cache;
+import org.jboss.cache.CacheStatus;
import org.jboss.cache.Fqn;
import org.jboss.cache.eviction.EvictionActionPolicy;
@@ -60,13 +61,19 @@
if (LOG.isDebugEnabled())
LOG.debug("Evicting Fqn " + fqn);
- cache.evict(fqn, recurcive);
- return true;
+ if (cache.getCacheStatus() == CacheStatus.STARTED)
+ {
+ cache.evict(fqn, recurcive);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
catch (Exception e)
{
- if (LOG.isDebugEnabled())
- LOG.debug("Unable to evict " + fqn, e);
+ LOG.error("Unable to evict :" + fqn, e);
return false;
}
}
More information about the exo-jcr-commits
mailing list