Author: manik.surtani(a)jboss.com
Date: 2008-10-31 11:01:12 -0400 (Fri, 31 Oct 2008)
New Revision: 7045
Modified:
core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
core/trunk/src/main/java/org/jboss/cache/config/EvictionRegionConfig.java
core/trunk/src/main/java/org/jboss/cache/eviction/BaseEvictionAlgorithm.java
Log:
More debugging and better logging
Modified: core/trunk/src/main/java/org/jboss/cache/RegionImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RegionImpl.java 2008-10-31 12:06:57 UTC (rev
7044)
+++ core/trunk/src/main/java/org/jboss/cache/RegionImpl.java 2008-10-31 15:01:12 UTC (rev
7045)
@@ -208,6 +208,7 @@
public void setEvictionRegionConfig(EvictionRegionConfig evictionRegionConfig)
{
+ if (trace) log.trace("setEvictionRegionConfig called with " +
evictionRegionConfig);
this.evictionRegionConfig = evictionRegionConfig;
evictionAlgorithm =
createEvictionAlgorithm(evictionRegionConfig.getEvictionAlgorithmConfig(),
evictionRegionConfig.getEvictionActionPolicyClassName());
if (evictionEventQueue == null) createQueue();
@@ -277,6 +278,7 @@
private EvictionAlgorithm createEvictionAlgorithm(EvictionAlgorithmConfig algoConfig,
String evictionActionPolicyClass)
{
+ if (trace) log.trace("Creating eviction algorithm using config " +
algoConfig);
if (algoConfig == null)
throw new IllegalArgumentException("Eviction algorithm class must not be
null!");
Modified: core/trunk/src/main/java/org/jboss/cache/config/EvictionRegionConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/config/EvictionRegionConfig.java 2008-10-31
12:06:57 UTC (rev 7044)
+++ core/trunk/src/main/java/org/jboss/cache/config/EvictionRegionConfig.java 2008-10-31
15:01:12 UTC (rev 7045)
@@ -300,4 +300,15 @@
evictionAlgorithmConfig.validate();
}
+
+ @Override
+ public String toString()
+ {
+ return "EvictionRegionConfig{" +
+ "regionFqn=" + regionFqn +
+ ", eventQueueSize=" + eventQueueSize +
+ ", evictionAlgorithmConfig=" + evictionAlgorithmConfig +
+ ", evictionActionPolicyClassName='" +
evictionActionPolicyClassName + '\'' +
+ '}';
+ }
}
\ No newline at end of file
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/BaseEvictionAlgorithm.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/eviction/BaseEvictionAlgorithm.java 2008-10-31
12:06:57 UTC (rev 7044)
+++
core/trunk/src/main/java/org/jboss/cache/eviction/BaseEvictionAlgorithm.java 2008-10-31
15:01:12 UTC (rev 7045)
@@ -115,6 +115,7 @@
public void assignToRegion(Fqn fqn, CacheSPI<?, ?> cache,
EvictionAlgorithmConfig evictionAlgorithmConfig, Configuration configuration)
{
+ if (log.isTraceEnabled()) log.trace(getClass().getSimpleName() + "
instantiated and assigned to region " + fqn + " with cfg " +
evictionAlgorithmConfig);
this.regionFqn = fqn;
this.cache = cache;
this.evictionAlgorithmConfig = evictionAlgorithmConfig;
Show replies by date