Author: manik.surtani(a)jboss.com
Date: 2009-08-11 07:35:33 -0400 (Tue, 11 Aug 2009)
New Revision: 8181
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java
core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java
core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java
core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java
core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java
core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java
Log:
Code cleanup
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/commands/remote/ClusteredGetCommand.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -31,7 +31,6 @@
import org.jboss.cache.commands.read.GetChildrenNamesCommand;
import org.jboss.cache.commands.read.GetDataMapCommand;
import org.jboss.cache.interceptors.InterceptorChain;
-import org.jboss.cache.loader.CacheLoaderManager;
import java.util.ArrayList;
import java.util.Collections;
@@ -55,7 +54,6 @@
private boolean searchBackupSubtrees;
private DataContainer dataContainer;
private InterceptorChain interceptorChain;
- private CacheLoaderManager clm;
private static final Log log = LogFactory.getLog(ClusteredGetCommand.class);
private static final boolean trace = log.isTraceEnabled();
Modified: core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/config/parsing/XmlConfigHelper.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -519,7 +519,7 @@
}
catch (NoSuchMethodException me)
{
- // try other setters that may fit later on. Don't throw this exception
though.
+ // try other setters that may fit later on. Don't throw this exception
though.
}
catch (Exception e)
{
Modified:
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionAlgorithmConfigBase.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -107,7 +107,7 @@
public boolean equals(Object o)
{
if (this == o) return true;
- if (!(o instanceof EvictionAlgorithmConfigBase)) return false;
+ if (!(o.getClass().equals(getClass()))) return false;
EvictionAlgorithmConfigBase that = (EvictionAlgorithmConfigBase) o;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/eviction/EvictionPolicyConfigBase.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -100,7 +100,7 @@
public boolean equals(Object o)
{
if (this == o) return true;
- if (!(o instanceof EvictionPolicyConfigBase)) return false;
+ if (!(o.getClass().equals(getClass()))) return false;
EvictionPolicyConfigBase that = (EvictionPolicyConfigBase) o;
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java 2009-08-11
11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/FIFOAlgorithmConfig.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -72,12 +72,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof FIFOAlgorithmConfig && super.equals(obj));
- }
-
- @Override
public void reset()
{
super.reset();
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java 2009-08-11
11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -89,12 +89,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof FIFOConfiguration && super.equals(obj));
- }
-
- @Override
protected void setEvictionPolicyClassName()
{
setEvictionPolicyClass(FIFOPolicy.class.getName());
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java 2009-08-11
11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/MRUAlgorithmConfig.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -72,12 +72,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof MRUAlgorithmConfig && super.equals(obj));
- }
-
- @Override
public void reset()
{
super.reset();
Modified: core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java 2009-08-11
11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -93,12 +93,6 @@
}
@Override
- public boolean equals(Object obj)
- {
- return (obj instanceof MRUConfiguration && super.equals(obj));
- }
-
- @Override
public void reset()
{
setMaxNodes(-1);
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/LegacyActivationInterceptor.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -230,10 +230,9 @@
private boolean childrenLoaded(NodeSPI<?, ?> node) throws Exception
{
- if (!node.isChildrenLoaded())
- {
- if (loader.getChildrenNames(node.getFqn()) != null) return false;
- }
+ if (!node.isChildrenLoaded() && loader.getChildrenNames(node.getFqn()) !=
null)
+ return false;
+
for (NodeSPI child : node.getChildrenDirect())
{
if (!child.isDataLoaded())
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -346,17 +346,6 @@
}
/**
- * Retrieves a backup fqn in an array of arguments. This is typically used to parse
arguments from a data gravitation cleanup method.
- *
- * @param args array of arguments to parse
- * @return an Fqn
- */
- private Fqn getBackupFqn(Object[] args)
- {
- return (Fqn) args[1];
- }
-
- /**
* Adds a method call to the modification list of a given transaction's
transaction entry
*/
private void addToModificationList(WriteCommand command, InvocationContext ctx)
Modified: core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java 2009-08-11
11:26:17 UTC (rev 8180)
+++ core/trunk/src/main/java/org/jboss/cache/loader/jdbm/JdbmCacheLoader2.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -21,25 +21,21 @@
*/
package org.jboss.cache.loader.jdbm;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
import jdbm.helper.Tuple;
import jdbm.helper.TupleBrowser;
import net.jcip.annotations.ThreadSafe;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.CacheException;
import org.jboss.cache.Fqn;
-import org.jboss.cache.Modification;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
/**
* Optimized version of the {@link JdbmCacheLoader} implementation which is better
* for storing data under a single node. Speed is improved.
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/marshall/InactiveRegionAwareRpcDispatcher.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -26,7 +26,6 @@
import org.jboss.cache.factories.ComponentRegistry;
import org.jboss.cache.interceptors.InterceptorChain;
import org.jboss.cache.invocation.InvocationContextContainer;
-import org.jboss.cache.util.concurrent.ReclosableLatch;
import org.jgroups.Channel;
import org.jgroups.MembershipListener;
import org.jgroups.Message;
Modified:
core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java 2009-08-11
11:26:17 UTC (rev 8180)
+++
core/trunk/src/main/java/org/jboss/cache/transaction/BatchModeTransactionManagerLookup.java 2009-08-11
11:35:33 UTC (rev 8181)
@@ -22,9 +22,6 @@
package org.jboss.cache.transaction;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import javax.transaction.TransactionManager;
@@ -38,13 +35,8 @@
@Deprecated
public class BatchModeTransactionManagerLookup implements TransactionManagerLookup
{
- private Log log = LogFactory.getLog(BatchModeTransactionManagerLookup.class);
-
public TransactionManager getTransactionManager() throws Exception
{
- // (BES 2208/11/2) We decided to use JBC 3 in JBoss AS 5. Therefore
- // this is not a correct statement and I am removing this logging.
- //log.warn("Using a deprecated/unsupported transaction manager!");
return BatchModeTransactionManager.getInstance();
}
}
Show replies by date