[jboss-cvs] JBossCache/src/org/jboss/cache/config ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 14:48:48 EST 2006
User: msurtani
Date: 06/12/30 14:48:48
Modified: src/org/jboss/cache/config EvictionConfig.java
ConfigurationComponent.java Configuration.java
EvictionRegionConfig.java
Log:
Genericised, autoboxed
Revision Changes Path
1.7 +11 -12 JBossCache/src/org/jboss/cache/config/EvictionConfig.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionConfig.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/EvictionConfig.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- EvictionConfig.java 27 Nov 2006 04:49:46 -0000 1.6
+++ EvictionConfig.java 30 Dec 2006 19:48:48 -0000 1.7
@@ -21,18 +21,18 @@
*/
package org.jboss.cache.config;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.cache.RegionImpl;
import org.jboss.cache.RegionManager;
import org.jboss.cache.eviction.EvictionPolicy;
import org.jboss.cache.eviction.EvictionPolicyConfig;
+import java.util.Collections;
+import java.util.List;
+
public class EvictionConfig extends ConfigurationComponent
{
- /** The serialVersionUID */
+ /**
+ * The serialVersionUID
+ */
private static final long serialVersionUID = -7979639000026975201L;
public static final String WAKEUP_INTERVAL_SECONDS = "wakeUpIntervalSeconds";
@@ -123,9 +123,8 @@
// Make sure region configs built by MC have the event queue size
if (evictionRegionConfigs != null)
{
- for (Iterator it = evictionRegionConfigs.iterator(); it.hasNext();)
+ for (EvictionRegionConfig cfg : evictionRegionConfigs)
{
- EvictionRegionConfig cfg = (EvictionRegionConfig) it.next();
cfg.setDefaultEventQueueSize(getDefaultEventQueueSize());
}
}
1.4 +7 -8 JBossCache/src/org/jboss/cache/config/ConfigurationComponent.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConfigurationComponent.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/ConfigurationComponent.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ConfigurationComponent.java 30 Dec 2006 17:50:00 -0000 1.3
+++ ConfigurationComponent.java 30 Dec 2006 19:48:48 -0000 1.4
@@ -14,7 +14,6 @@
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
/**
@@ -22,7 +21,7 @@
* that can be changed after the cache is started.
*
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @see #testImmutability(String)
*/
public class ConfigurationComponent implements Serializable, Cloneable
@@ -42,14 +41,14 @@
{
if (child != null)
{
- child.setTreeCache(cache);
+ child.setCacheImpl(cache);
}
}
protected void addChildConfig(ConfigurationComponent child)
{
if (child != null && children.add(child))
- child.setTreeCache(cache);
+ child.setCacheImpl(cache);
}
protected void addChildConfigs(Collection<? extends ConfigurationComponent> toAdd)
@@ -121,14 +120,14 @@
*
* @param cache
*/
- public void setTreeCache(CacheImpl cache)
+ public void setCacheImpl(CacheImpl cache)
{
this.cache = cache;
synchronized (children)
{
- for (Iterator it = children.iterator(); it.hasNext();)
+ for (ConfigurationComponent child : children)
{
- ((ConfigurationComponent) it.next()).setTreeCache(cache);
+ child.setCacheImpl(cache);
}
}
}
@@ -136,7 +135,7 @@
public ConfigurationComponent clone() throws CloneNotSupportedException
{
ConfigurationComponent c = (ConfigurationComponent) super.clone();
- c.setTreeCache(null);
+ c.setCacheImpl(null);
return c;
}
1.29 +1 -1 JBossCache/src/org/jboss/cache/config/Configuration.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Configuration.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/Configuration.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- Configuration.java 30 Dec 2006 17:50:00 -0000 1.28
+++ Configuration.java 30 Dec 2006 19:48:48 -0000 1.29
@@ -115,7 +115,7 @@
*/
public Configuration(CacheImpl cache)
{
- setTreeCache(cache);
+ setCacheImpl(cache);
}
/**
1.3 +27 -23 JBossCache/src/org/jboss/cache/config/EvictionRegionConfig.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionRegionConfig.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/EvictionRegionConfig.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- EvictionRegionConfig.java 27 Oct 2006 19:26:07 -0000 1.2
+++ EvictionRegionConfig.java 30 Dec 2006 19:48:48 -0000 1.3
@@ -27,7 +27,9 @@
public class EvictionRegionConfig extends ConfigurationComponent
{
- /** The serialVersionUID */
+ /**
+ * The serialVersionUID
+ */
private static final long serialVersionUID = -5482474634995601400L;
public static final String NAME = "name";
@@ -40,7 +42,9 @@
private Integer eventQueueSize;
private EvictionPolicyConfig evictionPolicyConfig;
- public EvictionRegionConfig() {}
+ public EvictionRegionConfig()
+ {
+ }
public EvictionPolicyConfig getEvictionPolicyConfig()
{
@@ -74,6 +78,7 @@
testImmutability("regionFqn");
this.regionFqn = regionFqn;
}
+
public String getRegionName()
{
return regionFqn == null ? null : regionFqn.toString();
@@ -86,7 +91,7 @@
public int getEventQueueSize()
{
- return eventQueueSize == null ? EvictionConfig.EVENT_QUEUE_SIZE_DEFAULT : eventQueueSize.intValue();
+ return eventQueueSize == null ? EvictionConfig.EVENT_QUEUE_SIZE_DEFAULT : eventQueueSize;
}
public void setEventQueueSize(int queueSize)
@@ -99,7 +104,7 @@
EvictionConfig.EVENT_QUEUE_SIZE_DEFAULT);
queueSize = EvictionConfig.EVENT_QUEUE_SIZE_DEFAULT;
}
- this.eventQueueSize = new Integer(queueSize);
+ this.eventQueueSize = queueSize;
}
public void setDefaultEventQueueSize(int queueSize)
@@ -133,5 +138,4 @@
}
-
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list