[infinispan-commits] Infinispan SVN: r273 - trunk/core/src/main/java/org/infinispan/interceptors.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Wed May 13 02:56:44 EDT 2009


Author: mircea.markus
Date: 2009-05-13 02:56:43 -0400 (Wed, 13 May 2009)
New Revision: 273

Modified:
   trunk/core/src/main/java/org/infinispan/interceptors/CallInterceptor.java
Log:
simplified

Modified: trunk/core/src/main/java/org/infinispan/interceptors/CallInterceptor.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/interceptors/CallInterceptor.java	2009-05-13 06:44:19 UTC (rev 272)
+++ trunk/core/src/main/java/org/infinispan/interceptors/CallInterceptor.java	2009-05-13 06:56:43 UTC (rev 273)
@@ -23,14 +23,10 @@
 
 
 import org.infinispan.commands.LockControlCommand;
-import org.infinispan.commands.ReplicableCommand;
 import org.infinispan.commands.VisitableCommand;
 import org.infinispan.commands.tx.CommitCommand;
 import org.infinispan.commands.tx.PrepareCommand;
 import org.infinispan.commands.tx.RollbackCommand;
-import org.infinispan.commands.write.ClearCommand;
-import org.infinispan.commands.write.PutKeyValueCommand;
-import org.infinispan.commands.write.RemoveCommand;
 import org.infinispan.context.InvocationContext;
 import org.infinispan.context.impl.TxInvocationContext;
 import org.infinispan.interceptors.base.CommandInterceptor;
@@ -69,12 +65,8 @@
    }
 
    @Override
-   public Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable {
+   final public Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable {
       if (trace) log.trace("Executing command: " + command + ".");
-      return invokeCommand(ctx, command);
-   }
-
-   private Object invokeCommand(InvocationContext ctx, ReplicableCommand command) throws Throwable {
       Object retval;
       try {
          retval = command.perform(ctx);
@@ -90,19 +82,4 @@
       }
       return retval;
    }
-
-   @Override
-   public Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command) throws Throwable {
-      return invokeCommand(ctx, command);
-   }
-
-   @Override
-   public Object visitClearCommand(InvocationContext ctx, ClearCommand command) throws Throwable {
-      return invokeCommand(ctx, command);
-   }
-
-   @Override
-   public Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command) throws Throwable {
-      return invokeCommand(ctx, command);
-   }
 }
\ No newline at end of file




More information about the infinispan-commits mailing list