[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 14:48:46 EST 2006
User: msurtani
Date: 06/12/30 14:48:46
Modified: src/org/jboss/cache/interceptors
OptimisticNodeInterceptor.java
CacheStoreInterceptor.java
DataGravitatorInterceptor.java
ActivationInterceptor.java EvictionInterceptor.java
Interceptor.java
Log:
Genericised, autoboxed
Revision Changes Path
1.38 +1 -1 JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticNodeInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticNodeInterceptor.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- OptimisticNodeInterceptor.java 30 Dec 2006 17:49:53 -0000 1.37
+++ OptimisticNodeInterceptor.java 30 Dec 2006 19:48:46 -0000 1.38
@@ -120,7 +120,7 @@
{
case MethodDeclarations.putDataMethodLocal_id:
Boolean erase = (Boolean) args[3];
- putDataMap(args, erase.booleanValue(), workspace, workspaceNode);
+ putDataMap(args, erase, workspace, workspaceNode);
break;
case MethodDeclarations.putDataEraseMethodLocal_id:
putDataMap(args, true, workspace, workspaceNode);
1.41 +3 -3 JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheStoreInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- CacheStoreInterceptor.java 30 Dec 2006 17:49:54 -0000 1.40
+++ CacheStoreInterceptor.java 30 Dec 2006 19:48:46 -0000 1.41
@@ -27,7 +27,7 @@
* through the CacheLoader, either after each method call (no TXs), or at TX commit.
*
* @author Bela Ban
- * @version $Id: CacheStoreInterceptor.java,v 1.40 2006/12/30 17:49:54 msurtani Exp $
+ * @version $Id: CacheStoreInterceptor.java,v 1.41 2006/12/30 19:48:46 msurtani Exp $
*/
public class CacheStoreInterceptor extends BaseCacheLoaderInterceptor implements CacheStoreInterceptorMBean
{
@@ -108,7 +108,7 @@
Integer puts = (Integer) m_txStores.get(gtx);
if (puts != null)
{
- m_cacheStores = m_cacheStores + puts.intValue();
+ m_cacheStores = m_cacheStores + puts;
}
m_txStores.remove(gtx);
}
@@ -379,7 +379,7 @@
preparingTxs.put(gtx, gtx);
if (configuration.getExposeManagementStatistics() && getStatisticsEnabled() && txPuts > 0)
{
- m_txStores.put(gtx, new Integer(txPuts));
+ m_txStores.put(gtx, txPuts);
}
}
}
1.32 +1 -1 JBossCache/src/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DataGravitatorInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/DataGravitatorInterceptor.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- DataGravitatorInterceptor.java 30 Dec 2006 17:49:54 -0000 1.31
+++ DataGravitatorInterceptor.java 30 Dec 2006 19:48:46 -0000 1.32
@@ -339,7 +339,7 @@
// keep looping till we find a FOUND answer.
List dGravResp = (List) o;
// found?
- if (((Boolean) dGravResp.get(0)).booleanValue())
+ if ((Boolean) dGravResp.get(0))
{
result = dGravResp.get(1);
backupFqn = dGravResp.get(2);
1.46 +4 -4 JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ActivationInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/ActivationInterceptor.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- ActivationInterceptor.java 30 Dec 2006 17:49:54 -0000 1.45
+++ ActivationInterceptor.java 30 Dec 2006 19:48:46 -0000 1.46
@@ -25,7 +25,7 @@
* their attributes have been initialized and their children have been loaded in memory.
*
* @author <a href="mailto:{hmesha at novell.com}">{Hany Mesha}</a>
- * @version $Id: ActivationInterceptor.java,v 1.45 2006/12/30 17:49:54 msurtani Exp $
+ * @version $Id: ActivationInterceptor.java,v 1.46 2006/12/30 19:48:46 msurtani Exp $
*/
public class ActivationInterceptor extends CacheLoaderInterceptor implements ActivationInterceptorMBean
{
@@ -250,10 +250,10 @@
protected boolean hasModifications(Object[] args)
{
int hint = 1;
- if (args[hint] instanceof Boolean) return ((Boolean) args[hint]).booleanValue();
+ if (args[hint] instanceof Boolean) return (Boolean) args[hint];
for (int i = 0; i < args.length; i++)
{
- if (args[i] instanceof Boolean) return ((Boolean) args[i]).booleanValue();
+ if (args[i] instanceof Boolean) return (Boolean) args[i];
}
return false;
}
@@ -330,7 +330,7 @@
loader.prepare(gtx, cache_loader_modifications, false);
if (configuration.getExposeManagementStatistics() && getStatisticsEnabled() && txActs > 0)
{
- m_txActivations.put(gtx, Integer.valueOf(txActs));
+ m_txActivations.put(gtx, txActs);
}
}
}
1.11 +19 -19 JBossCache/src/org/jboss/cache/interceptors/EvictionInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/EvictionInterceptor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- EvictionInterceptor.java 27 Nov 2006 04:49:46 -0000 1.10
+++ EvictionInterceptor.java 30 Dec 2006 19:48:46 -0000 1.11
@@ -11,12 +11,12 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
-import org.jboss.cache.RegionManager;
import org.jboss.cache.Region;
+import org.jboss.cache.RegionManager;
import org.jboss.cache.eviction.EvictedEventNode;
import org.jboss.cache.eviction.NodeEventType;
-import org.jboss.cache.marshall.MethodDeclarations;
import org.jboss.cache.marshall.MethodCall;
+import org.jboss.cache.marshall.MethodDeclarations;
import java.util.HashMap;
import java.util.Map;
@@ -27,7 +27,7 @@
* This interceptor is used to handle eviction events.
*
* @author Daniel Huang
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class EvictionInterceptor extends Interceptor
{
@@ -315,7 +315,7 @@
}
EvictedEventNode event = new EvictedEventNode(fqn, NodeEventType.ADD_NODE_EVENT, size);
- event.setResetElementCount(resetElementCount.booleanValue());
+ event.setResetElementCount(resetElementCount);
return event;
}
1.26 +4 -4 JBossCache/src/org/jboss/cache/interceptors/Interceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Interceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/Interceptor.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- Interceptor.java 13 Sep 2006 13:11:18 -0000 1.25
+++ Interceptor.java 30 Dec 2006 19:48:46 -0000 1.26
@@ -39,7 +39,7 @@
* <em>Note that this will be replaced by {@link org.jboss.aop.advice.Interceptor} in one of the next releases</em>
*
* @author Bela Ban
- * @version $Id: Interceptor.java,v 1.25 2006/09/13 13:11:18 msurtani Exp $
+ * @version $Id: Interceptor.java,v 1.26 2006/12/30 19:48:46 msurtani Exp $
*/
public abstract class Interceptor implements InterceptorMBean
{
@@ -171,10 +171,10 @@
switch (m.getMethodId())
{
case MethodDeclarations.prepareMethod_id:
- return ((Boolean) m.getArgs()[3]).booleanValue();
+ return (Boolean) m.getArgs()[3];
case MethodDeclarations.optimisticPrepareMethod_id:
- return ((Boolean) m.getArgs()[4]).booleanValue();
- default :
+ return (Boolean) m.getArgs()[4];
+ default:
return false;
}
}
More information about the jboss-cvs-commits
mailing list