[jbosscache-commits] JBoss Cache SVN: r5743 - core/trunk/src/main/java/org/jboss/cache/interceptors/base.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Apr 29 07:04:06 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-29 07:04:05 -0400 (Tue, 29 Apr 2008)
New Revision: 5743

Removed:
   core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java
Log:
Refactoring

Deleted: core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java	2008-04-29 10:26:00 UTC (rev 5742)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/PostProcessingChainedInterceptor.java	2008-04-29 11:04:05 UTC (rev 5743)
@@ -1,382 +0,0 @@
-package org.jboss.cache.interceptors.base;
-
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.commands.VisitableCommand;
-import org.jboss.cache.commands.read.GetChildrenNamesCommand;
-import org.jboss.cache.commands.read.GetDataMapCommand;
-import org.jboss.cache.commands.read.GetKeyValueCommand;
-import org.jboss.cache.commands.read.GetKeysCommand;
-import org.jboss.cache.commands.read.GetNodeCommand;
-import org.jboss.cache.commands.read.GravitateDataCommand;
-import org.jboss.cache.commands.read.RemoteExistsCommand;
-import org.jboss.cache.commands.tx.CommitCommand;
-import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
-import org.jboss.cache.commands.tx.PrepareCommand;
-import org.jboss.cache.commands.tx.RollbackCommand;
-import org.jboss.cache.commands.write.EvictCommand;
-import org.jboss.cache.commands.write.InvalidateCommand;
-import org.jboss.cache.commands.write.MoveCommand;
-import org.jboss.cache.commands.write.PutDataMapCommand;
-import org.jboss.cache.commands.write.PutKeyValueCommand;
-import org.jboss.cache.commands.write.RemoveDataCommand;
-import org.jboss.cache.commands.write.RemoveKeyCommand;
-import org.jboss.cache.commands.write.RemoveNodeCommand;
-
-/**
- * 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 at jboss.com
- * @since 2.2
- */
-public abstract class PostProcessingChainedInterceptor extends CommandInterceptor
-{
-   @Override
-   public final Object visitPutDataMapCommand(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);
-   }
-
-   @Override
-   public final Object visitPutKeyValueCommand(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);
-   }
-
-   @Override
-   public final Object visitRemoveNodeCommand(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);
-   }
-
-   @Override
-   public final Object visitRemoveDataCommand(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);
-   }
-
-   @Override
-   public final Object visitEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
-   {
-      try
-      {
-         return executeEvictFqnCommand(ctx, command);
-      }
-      finally
-      {
-         doAfterCall(ctx);
-      }
-   }
-
-   public Object executeEvictFqnCommand(InvocationContext ctx, EvictCommand command) throws Throwable
-   {
-      return executeAll(ctx, command);
-   }
-
-   @Override
-   public final Object visitInvalidateCommand(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);
-   }
-
-   @Override
-   public final Object visitRemoveKeyCommand(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);
-   }
-
-   @Override
-   public final Object visitGetDataMapCommand(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);
-   }
-
-   @Override
-   public final Object visitExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
-   {
-      try
-      {
-         return executeExistsNodeCommand(ctx, command);
-      }
-      finally
-      {
-         doAfterCall(ctx);
-      }
-   }
-
-   public Object executeExistsNodeCommand(InvocationContext ctx, RemoteExistsCommand command) throws Throwable
-   {
-      return executeAll(ctx, command);
-   }
-
-   @Override
-   public final Object visitGetKeyValueCommand(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);
-   }
-
-   @Override
-   public final Object visitGetNodeCommand(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);
-   }
-
-   @Override
-   public final Object visitGetKeysCommand(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);
-   }
-
-   @Override
-   public final Object visitGetChildrenNamesCommand(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);
-   }
-
-   @Override
-   public final Object visitMoveCommand(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);
-   }
-
-   @Override
-   public final Object visitGravitateDataCommand(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);
-   }
-
-   @Override
-   public final Object visitPrepareCommand(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);
-   }
-
-   @Override
-   public final Object visitRollbackCommand(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);
-   }
-
-   @Override
-   public final Object visitCommitCommand(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);
-   }
-
-   @Override
-   public final Object visitOptimisticPrepareCommand(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 Object executeAll(InvocationContext ctx, VisitableCommand command) throws Throwable
-   {
-      return invokeNextInterceptor(ctx, command);
-   }
-
-   public abstract void doAfterCall(InvocationContext ctx);
-}




More information about the jbosscache-commits mailing list