JBoss Cache SVN: r5653 - core/trunk/src/main/java/org/jboss/cache/invocation.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-24 05:20:40 -0400 (Thu, 24 Apr 2008)
New Revision: 5653
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/CacheData.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java
core/trunk/src/main/java/org/jboss/cache/invocation/CacheTransactionHelper.java
core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java
Log:
Added todos
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheData.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheData.java 2008-04-24 08:51:02 UTC (rev 5652)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheData.java 2008-04-24 09:20:40 UTC (rev 5653)
@@ -7,10 +7,10 @@
import org.jboss.cache.Node;
import org.jboss.cache.NodeNotExistsException;
import org.jboss.cache.NodeSPI;
-import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.buddyreplication.BuddyFqnTransformer;
import org.jboss.cache.buddyreplication.BuddyManager;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.factories.annotations.Inject;
import org.jboss.cache.marshall.NodeData;
import org.jboss.cache.optimistic.DataVersion;
import org.jboss.cache.transaction.GlobalTransaction;
@@ -28,6 +28,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+// TODO: Rename to DataContainer (?) and move to org.jboss.cache
public class CacheData
{
@@ -40,7 +41,7 @@
*/
private NodeSPI root;
- @Inject
+ @Inject
public void injectDependencies(Configuration configuration)
{
this.configuration = configuration;
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java 2008-04-24 08:51:02 UTC (rev 5652)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheLifecycleManager.java 2008-04-24 09:20:40 UTC (rev 5653)
@@ -26,6 +26,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+// TODO: Rename to LifecycleManager and move to org.jboss.cache
public class CacheLifecycleManager
{
private static Log log = LogFactory.getLog(CacheLifecycleManager.class);
@@ -146,7 +147,8 @@
log.warn("Needed to call stop() before destroying but stop() " +
"threw exception. Proceeding to destroy", e);
}
- } else
+ }
+ else
return;
}
@@ -282,7 +284,8 @@
};
Runtime.getRuntime().addShutdownHook(shutdownHook);
- } else
+ }
+ else
{
if (log.isTraceEnabled())
log.trace("Not registering a shutdown hook. Configured behavior = " + configuration.getShutdownHookBehavior());
@@ -415,7 +418,8 @@
category.append(rpcManager.getLocalAddress().toString().replace('.', '_'));
}
}
- } else
+ }
+ else
{
// we're in LOCAL mode
category.append("_LOCAL");
@@ -467,7 +471,8 @@
{
Thread.currentThread().interrupt();
}
- } else
+ }
+ else
{
log.warn("Received a remote call but the cache is not in STARTED state - ignoring call.");
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheTransactionHelper.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheTransactionHelper.java 2008-04-24 08:51:02 UTC (rev 5652)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheTransactionHelper.java 2008-04-24 09:20:40 UTC (rev 5653)
@@ -4,8 +4,8 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
import org.jboss.cache.RPCManager;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.config.Configuration;
import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.transaction.OptimisticTransactionEntry;
import org.jboss.cache.transaction.TransactionEntry;
@@ -21,6 +21,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+// TODO: Rename to GlobalTransactionFactory, and put in org.jboss.cache.transaction
public class CacheTransactionHelper
{
@@ -42,7 +43,7 @@
@Inject
public void initialize(TransactionTable transactionTable, TransactionManager transactionManager,
- RPCManager rpcManager, Configuration configuration)
+ RPCManager rpcManager, Configuration configuration)
{
this.transactionTable = transactionTable;
this.transactionManager = transactionManager;
@@ -93,7 +94,8 @@
if (status != Status.STATUS_COMMITTED)
{
log.warn("status is " + status + " (not ACTIVE or PREPARING); returning null)", new Throwable());
- } else
+ }
+ else
{
log.trace("status is COMMITTED; returning null");
}
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java 2008-04-24 08:51:02 UTC (rev 5652)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/InterceptorChain.java 2008-04-24 09:20:40 UTC (rev 5653)
@@ -21,6 +21,7 @@
* @author Mircea.Markus(a)jboss.com
* @since 2.2
*/
+// TODO: Move to org.jboss.cache.interceptors
public class InterceptorChain
{
/**
16 years, 2 months
JBoss Cache SVN: r5652 - in core/trunk/src/main/java/org/jboss/cache: interceptors and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-24 04:51:02 -0400 (Thu, 24 Apr 2008)
New Revision: 5652
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/functional/MarshallableCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/functional/TxCacheCommand.java
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
Log:
JBCACHE-1222 - added todos
Modified: core/trunk/src/main/java/org/jboss/cache/commands/functional/MarshallableCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/functional/MarshallableCommand.java 2008-04-23 14:41:36 UTC (rev 5651)
+++ core/trunk/src/main/java/org/jboss/cache/commands/functional/MarshallableCommand.java 2008-04-24 08:51:02 UTC (rev 5652)
@@ -22,6 +22,7 @@
Object[] getParameters();
/**
+ * todo - [mmarkus] rename is setParameters as this is oposit to getParamaters
* Sets the state of a command instance with unmarshalled command id and args.
*
* @param commandId command id to set. This is usually unused but *could* be used in the event of a command having multiple IDs, such as {@link org.jboss.cache.commands.cachedata.PutKeyValueCommand}.
Modified: core/trunk/src/main/java/org/jboss/cache/commands/functional/TxCacheCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/functional/TxCacheCommand.java 2008-04-23 14:41:36 UTC (rev 5651)
+++ core/trunk/src/main/java/org/jboss/cache/commands/functional/TxCacheCommand.java 2008-04-24 08:51:02 UTC (rev 5652)
@@ -7,6 +7,7 @@
*
* @author Mircea.Markus(a)jboss.com
* @since 2.2
+ * todo [mmarkus] revisit this and consider removing it as the GTX is already in the command through the invocation context
*/
public interface TxCacheCommand extends CacheCommand
{
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-04-23 14:41:36 UTC (rev 5651)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-04-24 08:51:02 UTC (rev 5652)
@@ -970,6 +970,7 @@
*/
private CacheCommand replaceGtx(CacheCommand m, final GlobalTransaction gtx) throws Throwable
{
+ //todo add this visitor locally
globalTransactionCommandsVisitor = new GlobalTransactionCommandsVisitor()
{
public Object handleGlobalTransactionCommands(GlobalTransactionCommand command)
16 years, 2 months
JBoss Cache SVN: r5651 - in core/trunk/src: main/java/org/jboss/cache/interceptors and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-23 10:41:36 -0400 (Wed, 23 Apr 2008)
New Revision: 5651
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
Log:
Fixed data gravitation cleanup
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-23 14:38:02 UTC (rev 5650)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-23 14:41:36 UTC (rev 5651)
@@ -143,12 +143,19 @@
private void evictNode(Fqn fqn) throws Throwable
{
- List<Fqn> toEvict = cacheData.getNodesForEviction(fqn, true);
- for (Fqn aFqn : toEvict)
+ if (cacheData.exists(fqn))
{
- EvictNodeCommand evictFqnCommand = new EvictNodeCommand(aFqn);
- invoker.invoke(evictFqnCommand);
+ List<Fqn> toEvict = cacheData.getNodesForEviction(fqn, true);
+ for (Fqn aFqn : toEvict)
+ {
+ EvictNodeCommand evictFqnCommand = commandsFactory.buildEvictFqnCommand(aFqn);
+ invoker.invoke(evictFqnCommand);
+ }
}
+ else
+ {
+ if (trace) log.trace("Not evicting " + fqn + " as it doesn't exist");
+ }
}
public Object accept(InvocationContext ctx, CommandsVisitor handler) throws Throwable
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-04-23 14:38:02 UTC (rev 5650)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/DataGravitatorInterceptor.java 2008-04-23 14:41:36 UTC (rev 5651)
@@ -77,8 +77,6 @@
private Configuration config;
private CommandsFactory commandsFactory;
private CacheSPI cacheSPI;
- private boolean usingOptimisticLocking;
- private boolean needToCleanup;
@Inject
public void injectComponents(BuddyManager buddyManager, Configuration config, CacheData cacheData, CommandsFactory commandsFactory, CacheSPI cacheSPI)
@@ -94,8 +92,6 @@
public void startInterceptor()
{
syncCommunications = config.getCacheMode() == Configuration.CacheMode.REPL_SYNC || config.getCacheMode() == Configuration.CacheMode.INVALIDATION_SYNC;
- usingOptimisticLocking = config.isNodeLockingOptimistic();
- needToCleanup = config.getBuddyReplicationConfig().isDataGravitationRemoveOnFind();
}
@Override
@@ -195,11 +191,7 @@
// store the gravitated node locally. This will cause it being backed up in the current instance's buddy.
createNode(data.backupData);
- if (needToCleanup)
- {
- // Clean up the previous data owner and backups made in the name of the previous owner.
- cleanBackupData(data, ctx);
- }
+ cleanBackupData(data, ctx);
}
}
else
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2008-04-23 14:38:02 UTC (rev 5650)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/BuddyReplicationWithCacheLoaderTest.java 2008-04-23 14:41:36 UTC (rev 5651)
@@ -90,7 +90,9 @@
if (!autoGravitate)
caches.get(2).getInvocationContext().getOptionOverrides().setForceDataGravitation(true);
+ // should cause a gravitation event
assertEquals(value, caches.get(2).get(fqn, key));
+ cleanupDelay(); // gravitation is async!!
assertNoLocks(caches);
for (int i = 0; i < 3; i++) System.out.println(i + ": " + loaders[i].get(fqn));
@@ -184,7 +186,10 @@
// request data from cache2
if (!autoGravitate)
caches.get(2).getInvocationContext().getOptionOverrides().setForceDataGravitation(true);
+
+ // should cause a gravitation event
assertEquals(value, caches.get(2).get(fqn, key));
+ cleanupDelay(); // gravitation is async!!
// test that data does not exist in cache0
assertTrue("should not exist in cache0", !caches.get(0).exists(fqn));
@@ -351,4 +356,8 @@
cfg.setEvictionConfig(ec);
}
+ private void cleanupDelay()
+ {
+ TestingUtil.sleepThread(250);
+ }
}
16 years, 2 months
JBoss Cache SVN: r5650 - in core/trunk/src/main/java/org/jboss/cache/interceptors: base and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-23 10:38:02 -0400 (Wed, 23 Apr 2008)
New Revision: 5650
Added:
core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java
Log:
JBCACHE-1222 - bug fixing - release locks in case of timeout exception
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-04-23 13:48:45 UTC (rev 5649)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheStoreInterceptor.java 2008-04-23 14:38:02 UTC (rev 5650)
@@ -205,7 +205,7 @@
* access an element just removed, causing the CacheLoader to *load* the element before *removing* it.
*/
@Override
- public Object executeRemoveFqnCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object executeRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
if (!inTransaction())
{
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-04-23 13:48:45 UTC (rev 5649)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java 2008-04-23 14:38:02 UTC (rev 5650)
@@ -15,7 +15,7 @@
import org.jboss.cache.commands.tx.RollbackCommand;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.interceptors.base.ChainedInterceptor;
+import org.jboss.cache.interceptors.base.PostProcessingChainedInterceptor;
import org.jboss.cache.invocation.CacheData;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.lock.LockManager;
@@ -44,7 +44,7 @@
* @author Bela Ban
* @version $Id$
*/
-public class PessimisticLockInterceptor extends ChainedInterceptor
+public class PessimisticLockInterceptor extends PostProcessingChainedInterceptor
{
private TransactionTable txTable;
private CacheData cacheData;
@@ -63,13 +63,13 @@
}
@Override
- public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ public Object executePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
{
return handlePutCommand(ctx, command, false);
}
@Override
- public Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ public Object executePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
{
return handlePutCommand(ctx, command, command.isPutForExternalRead());
}
@@ -97,13 +97,11 @@
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE, true,
zeroAcquisitionTimeout, false, true, null, false);
}
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ public Object executePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
{
// 2-phase commit prepares are no-ops here.
if (!command.isOnePhaseCommit()) return invokeNextInterceptor(ctx, command);
@@ -116,7 +114,7 @@
}
@Override
- public Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ public Object executeCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
{
commit(command.getGlobalTransaction());
if (trace) log.trace("bypassed locking as method commit() doesn't require locking");
@@ -126,7 +124,7 @@
}
@Override
- public Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ public Object executeRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
{
TransactionEntry entry = txTable.get(command.getGlobalTransaction());
if (trace)
@@ -156,7 +154,7 @@
}
@Override
- public Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ public Object executeMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
{
if (ctx.isLockingSuppressed()) return invokeNextInterceptor(ctx, command);
long timeout = ctx.getContextLockAcquisitionTimeout(lockAcquisitionTimeout);
@@ -185,12 +183,11 @@
{
n.getLock().releaseAll(Thread.currentThread());
}
- ctx.clearInvocationLocksAcquired();
return retValue;
}
@Override
- public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object executeRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
if (ctx.isLockingSuppressed()) return invokeNextInterceptor(ctx, command);
// need to make a note of ALL nodes created here!!
@@ -234,74 +231,64 @@
n.getLock().releaseAll(Thread.currentThread());
}
}
- ctx.clearInvocationLocksAcquired();
// if this is a delete op and we had to create the node, return a FALSE as nothing *really* was deleted!
return created ? false : retVal;
}
@Override
- public Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ public Object executeRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE, false, false, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ public Object executeRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE, false, false, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
+ public Object executeEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE, false, true, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ public Object executeGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ, false, false, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ public Object executeGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ, false, false, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ public Object executeGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ, false, false, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
@Override
- public Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ public Object executeGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
{
lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.READ, false, false, false, false, null, false);
- Object retVal = invokeNextInterceptor(ctx, command);
- ctx.clearInvocationLocksAcquired();
- return retVal;
+ return invokeNextInterceptor(ctx, command);
}
+ public void doAfterCall(InvocationContext ctx)
+ {
+ ctx.clearInvocationLocksAcquired();
+ }
+
/**
* Remove all locks held by <tt>tx</tt>, remove the transaction from the transaction table
*/
Added: core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java (rev 0)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java 2008-04-23 14:38:02 UTC (rev 5650)
@@ -0,0 +1,462 @@
+package org.jboss.cache.interceptors.base;
+
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.cachedata.*;
+import org.jboss.cache.commands.remote.*;
+import org.jboss.cache.commands.tx.PrepareCommand;
+import org.jboss.cache.commands.tx.RollbackCommand;
+import org.jboss.cache.commands.tx.CommitCommand;
+import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
+import org.jboss.cache.commands.channel.BlockChannelCommand;
+import org.jboss.cache.commands.channel.UnblockChannelCommand;
+import org.jboss.cache.commands.CacheCommand;
+
+/**
+ * This interceptor will call {@link #doAfterCall(org.jboss.cache.InvocationContext)} after invoking each handler method.
+ * e.g. it is usefull if same resource needs to be released after all invocations.
+ *
+ * @author Mircea.Markus(a)jboss.com
+ * @since 2.2
+ */
+public abstract class PostProcessingChainedInterceptor extends ChainedInterceptor
+{
+ @Override
+ public final Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ {
+ try
+ {
+ return executePutDataMapCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handlePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ {
+ try
+ {
+ return executePutKeyValueCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executePutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ {
+ try
+ {
+ return executeRemoveNodeCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ {
+ try
+ {
+ return executeRemoveDataCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
+ {
+ try
+ {
+ return executeEvictFqnCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ {
+ try
+ {
+ return executeInvalidateCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeInvalidateCommand(InvocationContext ctx, InvalidateCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ {
+ try
+ {
+ return executeRemoveKeyCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeRemoveKeyCommand(InvocationContext ctx, RemoveKeyCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ {
+ try
+ {
+ return executeGetDataMapCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleExistsNodeCommand(InvocationContext ctx, RemoteExistsNodeCommand command) throws Throwable
+ {
+ try
+ {
+ return executeExistsNodeCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeExistsNodeCommand(InvocationContext ctx, RemoteExistsNodeCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ {
+ try
+ {
+ return executeGetKeyValueCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ {
+ try
+ {
+ return executeGetNodeCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ {
+ try
+ {
+ return executeGetKeysCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeGetKeysCommand(InvocationContext ctx, GetKeysCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ {
+ try
+ {
+ return executeGetChildrenNamesCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeGetChildrenNamesCommand(InvocationContext ctx, GetChildrenNamesCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ {
+ try
+ {
+ return executeMoveCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeMoveCommand(InvocationContext ctx, MoveCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ {
+ try
+ {
+ return executeGravitateDataCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeGravitateDataCommand(InvocationContext ctx, GravitateDataCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handlePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ {
+ try
+ {
+ return executePrepareCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executePrepareCommand(InvocationContext ctx, PrepareCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ {
+ try
+ {
+ return executeRollbackCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeRollbackCommand(InvocationContext ctx, RollbackCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ {
+ try
+ {
+ return executeCommitCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeCommitCommand(InvocationContext ctx, CommitCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ {
+ try
+ {
+ return executeOptimisticPrepareCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeOptimisticPrepareCommand(InvocationContext ctx, OptimisticPrepareCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleReplicateCommand(InvocationContext ctx, ReplicateCommand command) throws Throwable
+ {
+ try
+ {
+ return executeReplicateCommands(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeReplicateCommands(InvocationContext ctx, ReplicateCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleAnnounceBuddyPoolName(InvocationContext ctx, AnnounceBuddyPoolNameCommand command) throws Throwable
+ {
+ try
+ {
+ return executeAnnounceBuddyPoolName(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeAnnounceBuddyPoolName(InvocationContext ctx, AnnounceBuddyPoolNameCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleRemoveFromBuddyGroupCommand(InvocationContext ctx, RemoveFromBuddyGroupCommand command) throws Throwable
+ {
+ try
+ {
+ return executeRemoveFromBuddyGroupCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeRemoveFromBuddyGroupCommand(InvocationContext ctx, RemoveFromBuddyGroupCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleAssignToBuddyGroupCommand(InvocationContext ctx, AssignToBuddyGroupCommand command) throws Throwable
+ {
+ try
+ {
+ return executeAssignToBuddyGroupCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeAssignToBuddyGroupCommand(InvocationContext ctx, AssignToBuddyGroupCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleDataGravitationCleanupCommand(InvocationContext ctx, DataGravitationCleanupCommand command) throws Throwable
+ {
+ try
+ {
+ return executeDataGravitationCleanupCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeDataGravitationCleanupCommand(InvocationContext ctx, DataGravitationCleanupCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleClusteredGetCommand(InvocationContext ctx, ClusteredGetCommand command) throws Throwable
+ {
+ try
+ {
+ return executeClusteredGetCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeClusteredGetCommand(InvocationContext ctx, ClusteredGetCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleBlockChannelCommand(InvocationContext ctx, BlockChannelCommand command) throws Throwable
+ {
+ try
+ {
+ return executeBlockChannelCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeBlockChannelCommand(InvocationContext ctx, BlockChannelCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public final Object handleUnblockChannelCommand(InvocationContext ctx, UnblockChannelCommand command) throws Throwable
+ {
+ try
+ {
+ return executeUnblockChannelCommand(ctx, command);
+ } finally
+ {
+ doAfterCall(ctx);
+ }
+ }
+
+ public Object executeUnblockChannelCommand(InvocationContext ctx, UnblockChannelCommand command) throws Throwable
+ {
+ return executeAll(ctx, command);
+ }
+
+ public Object executeAll(InvocationContext ctx, CacheCommand command) throws Throwable
+ {
+ return invokeNextInterceptor(ctx, command);
+ }
+
+ public abstract void doAfterCall(InvocationContext ctx);
+}
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java 2008-04-23 13:48:45 UTC (rev 5649)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java 2008-04-23 14:38:02 UTC (rev 5650)
@@ -55,10 +55,10 @@
{
return invokeNextInterceptor(ctx, command);
}
- return executeRemoveFqnCommand(ctx, command);
+ return executeRemoveNodeCommand(ctx, command);
}
- public Object executeRemoveFqnCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
+ public Object executeRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
{
return executeAll(ctx, command);
}
16 years, 2 months
JBoss Cache SVN: r5649 - core/trunk/src/main/java/org/jboss/cache/commands/remote.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-23 09:48:45 -0400 (Wed, 23 Apr 2008)
New Revision: 5649
Modified:
core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
Log:
Cleanup calls should be local
Modified: core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-23 13:48:36 UTC (rev 5648)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java 2008-04-23 13:48:45 UTC (rev 5649)
@@ -131,6 +131,7 @@
RemoveNodeCommand removeBackupCommand = commandsFactory.buildRemoveNodeCommand(gtx, toRemove, true, true, false);
InvocationContext ctx = invoker.getInvocationContext();
+ ctx.getOptionOverrides().setCacheModeLocal(true);
result = invoker.invoke(ctx, removeBackupCommand);
return result != null && (Boolean) result;
}
16 years, 2 months
JBoss Cache SVN: r5648 - core/trunk/src/main/java/org/jboss/cache/interceptors.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-23 09:48:36 -0400 (Wed, 23 Apr 2008)
New Revision: 5648
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
Log:
JBCACHE-1222 - bug fixing - marshalling
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-04-23 13:48:34 UTC (rev 5647)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/MarshalledValueInterceptor.java 2008-04-23 13:48:36 UTC (rev 5648)
@@ -58,8 +58,8 @@
Set<MarshalledValue> marshalledValues = new HashSet<MarshalledValue>();
if (!MarshalledValueHelper.isTypeExcluded(command.getKey().getClass()))
{
- Object value = createAndAddMarshalledValue(command.getKey(), marshalledValues, ctx);
- command.setValue(value);
+ Object newKey = createAndAddMarshalledValue(command.getKey(), marshalledValues, ctx);
+ command.setKey(newKey);
}
if (!MarshalledValueHelper.isTypeExcluded(command.getValue().getClass()))
{
16 years, 2 months
JBoss Cache SVN: r5647 - core/trunk/src/main/java/org/jboss/cache.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-23 09:48:34 -0400 (Wed, 23 Apr 2008)
New Revision: 5647
Modified:
core/trunk/src/main/java/org/jboss/cache/StringFqn.java
Log:
More accurate construction
Modified: core/trunk/src/main/java/org/jboss/cache/StringFqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-23 13:48:19 UTC (rev 5646)
+++ core/trunk/src/main/java/org/jboss/cache/StringFqn.java 2008-04-23 13:48:34 UTC (rev 5647)
@@ -36,7 +36,20 @@
protected StringFqn(StringFqn base, StringFqn relative)
{
super(true, base, relative.elements);
- stringRepresentation = base.isRoot() ? relative.stringRepresentation : base.stringRepresentation + relative.stringRepresentation;
+ if (base.isRoot())
+ {
+ if (relative.isRoot())
+ stringRepresentation = SEPARATOR;
+ else
+ stringRepresentation = relative.stringRepresentation;
+ }
+ else
+ {
+ if (relative.isRoot())
+ stringRepresentation = base.stringRepresentation;
+ else
+ stringRepresentation = base.stringRepresentation + relative.stringRepresentation;
+ }
}
protected StringFqn(List<String> stringElements)
16 years, 2 months
JBoss Cache SVN: r5646 - core/trunk/src/test/java/org/jboss/cache/buddyreplication.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-23 09:48:19 -0400 (Wed, 23 Apr 2008)
New Revision: 5646
Modified:
core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java
Log:
Added delay for async cleanup calls
Modified: core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java 2008-04-23 13:32:58 UTC (rev 5645)
+++ core/trunk/src/test/java/org/jboss/cache/buddyreplication/GravitationCleanupTest.java 2008-04-23 13:48:19 UTC (rev 5646)
@@ -2,6 +2,7 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.Fqn;
+import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.util.CachePrinter;
import org.testng.annotations.Test;
@@ -59,6 +60,8 @@
// now do a gravitate call.
assert buddy.get(fqn, key).equals(value) : "Data should have gravitated!";
+ // gravitation cleanup calls are async.
+ cleanupDelay();
System.out.println("dataOwner: " + CachePrinter.printCacheLockingInfo(dataOwner));
System.out.println("buddy: " + CachePrinter.printCacheLockingInfo(buddy));
@@ -105,6 +108,9 @@
// now do a gravitate call.
assert thirdInstance.get(fqn, key).equals(value) : "Data should have gravitated!";
+ // gravitation cleanup calls are async.
+ cleanupDelay();
+
System.out.println("dataOwner: " + CachePrinter.printCacheLockingInfo(dataOwner));
System.out.println("buddy: " + CachePrinter.printCacheLockingInfo(buddy));
System.out.println("thirdInstance: " + CachePrinter.printCacheLockingInfo(thirdInstance));
@@ -121,4 +127,9 @@
assert buddy.peek(fqn.getParent(), false) == null : "Should not have any part of the data";
assert buddy.peek(BuddyFqnTransformer.getBackupFqn(dataOwner.getLocalAddress(), fqn), false) == null : "Should NOT have backup data";
}
+
+ private void cleanupDelay()
+ {
+ TestingUtil.sleepThread(250);
+ }
}
16 years, 2 months
JBoss Cache SVN: r5645 - core/trunk/src/main/java/org/jboss/cache/invocation.
by jbosscache-commits@lists.jboss.org
Author: mircea.markus
Date: 2008-04-23 09:32:58 -0400 (Wed, 23 Apr 2008)
New Revision: 5645
Modified:
core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
Log:
JBCACHE-1222 - bug fixing - marshalling
Modified: core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-04-23 13:11:40 UTC (rev 5644)
+++ core/trunk/src/main/java/org/jboss/cache/invocation/CacheInvocationDelegate.java 2008-04-23 13:32:58 UTC (rev 5645)
@@ -34,6 +34,7 @@
*
* @author Manik Surtani (<a href="mailto:manik@jboss.org">manik(a)jboss.org</a>)
* @since 2.1.0
+ * todo [mmarkus] consider renaming this as it does not look as an Delegate (rather as a facade)
*/
@SuppressWarnings("unchecked")
public class CacheInvocationDelegate<K, V> extends AbstractInvocationDelegate implements CacheSPI<K, V>
@@ -117,11 +118,7 @@
public void addInterceptor(ChainedInterceptor i, Class<? extends ChainedInterceptor> afterInterceptor)
{
- boolean added = invoker.addInterceptor(i, afterInterceptor);
- if (added)
- {
- lifecycleManager.startManualComponents();
- }
+ invoker.addInterceptor(i, afterInterceptor);
}
public List<ChainedInterceptor> getInterceptorChain()
16 years, 2 months
JBoss Cache SVN: r5644 - core/trunk/src/main/java/org/jboss/cache/interceptors.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2008-04-23 09:11:40 -0400 (Wed, 23 Apr 2008)
New Revision: 5644
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
Log:
Updated
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java 2008-04-23 11:46:31 UTC (rev 5643)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java 2008-04-23 13:11:40 UTC (rev 5644)
@@ -76,7 +76,6 @@
*/
public Object invoke(InvocationContext ctx) throws Throwable
{
- //return next.invoke(ctx);
return handleDefault(ctx, null);
}
@@ -85,15 +84,16 @@
*/
public Object nextInterceptor(InvocationContext ctx) throws Throwable
{
-// return getNext().invoke(ctx);
return invokeNextInterceptor(ctx, null);
}
+ @Override
public boolean getStatisticsEnabled()
{
return statsEnabled;
}
+ @Override
public void setStatisticsEnabled(boolean enabled)
{
statsEnabled = enabled;
@@ -103,6 +103,7 @@
* This implementation returns an empty Map. If individual Interceptors wish to expose statistics, they can override this
* method.
*/
+ @Override
public Map<String, Object> dumpStatistics()
{
return Collections.emptyMap();
@@ -112,10 +113,12 @@
* This implementation is a no-op. If individual Interceptors wish to expose statistics, they can override this
* method.
*/
+ @Override
public void resetStatistics()
{
}
+ @Override
public String toString()
{
return getClass().getName()
@@ -159,6 +162,7 @@
// return n;
}
+ @Override
public Object handleDefault(InvocationContext ctx, CacheCommand command) throws Throwable
{
if (command != null) //call originated from a command's accept() method.
16 years, 2 months