[jbosscache-commits] JBoss Cache SVN: r5556 - in core/trunk/src: main/java/org/jboss/cache/commands/cachedata and 5 other directories.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Mon Apr 14 10:54:20 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-14 10:54:20 -0400 (Mon, 14 Apr 2008)
New Revision: 5556

Added:
   core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictNodeCommand.java
Removed:
   core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictFqnCommand.java
Modified:
   core/trunk/src/main/java/org/jboss/cache/commands/CommandsFactory.java
   core/trunk/src/main/java/org/jboss/cache/commands/CommandsVisitor.java
   core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java
   core/trunk/src/main/java/org/jboss/cache/commands/visitors/AbstractCommandsVisitor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java
   core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java
   core/trunk/src/test/java/org/jboss/cache/marshall/BackwardCompatTest.java
Log:
It is a node that gets evicted; not an Fqn!

Modified: core/trunk/src/main/java/org/jboss/cache/commands/CommandsFactory.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/CommandsFactory.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/commands/CommandsFactory.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -7,12 +7,18 @@
 import org.jboss.cache.commands.cachedata.*;
 import org.jboss.cache.commands.channel.BlockChannelCommand;
 import org.jboss.cache.commands.channel.UnblockChannelCommand;
-import org.jboss.cache.commands.remote.*;
+import org.jboss.cache.commands.functional.MarshallableCommand;
+import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ClusteredGetCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.GravitateDataCommand;
+import org.jboss.cache.commands.remote.RemoveFromBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
 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.functional.MarshallableCommand;
 import org.jboss.cache.factories.ComponentRegistry;
 import org.jboss.cache.factories.annotations.Inject;
 import org.jboss.cache.transaction.GlobalTransaction;
@@ -121,9 +127,9 @@
       return command;
    }
 
-   public EvictFqnCommand buildEvictFqnCommand(Fqn fqn)
+   public EvictNodeCommand buildEvictFqnCommand(Fqn fqn)
    {
-      EvictFqnCommand command = new EvictFqnCommand(fqn);
+      EvictNodeCommand command = new EvictNodeCommand(fqn);
       registry.wireDependencies(command);
       return command;
    }

Modified: core/trunk/src/main/java/org/jboss/cache/commands/CommandsVisitor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/CommandsVisitor.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/commands/CommandsVisitor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -2,13 +2,19 @@
 
 import org.jboss.cache.InvocationContext;
 import org.jboss.cache.commands.cachedata.*;
+import org.jboss.cache.commands.channel.BlockChannelCommand;
+import org.jboss.cache.commands.channel.UnblockChannelCommand;
+import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ClusteredGetCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.GravitateDataCommand;
+import org.jboss.cache.commands.remote.RemoveFromBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
+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.tx.CommitCommand;
-import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
-import org.jboss.cache.commands.remote.*;
-import org.jboss.cache.commands.channel.BlockChannelCommand;
-import org.jboss.cache.commands.channel.UnblockChannelCommand;
 
 /**
  * @author Mircea.Markus at jboss.com
@@ -37,7 +43,6 @@
 //         crudMethodIds.add(removeKeyVersionedMethodLocal_id);
 //         crudMethodIds.add(removeDataVersionedMethodLocal_id);
 
-
    /*
    equiv of old:
      1 - putDataEraseMethodLocal_id
@@ -45,6 +50,7 @@
      3 - putDataEraseVersionedMethodLocal_id
      4 - putDataVersionedMethodLocal_id
    */
+
    public Object handlePutDataMapCommand(InvocationContext ctx, PutDataMapCommand command) throws Throwable;
 
    /*
@@ -75,7 +81,7 @@
        1 - evictNodeMethodLocal_id
        2 - evictVersionedNodeMethodLocal_id
     */
-   public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand evictFqnCommand) throws Throwable;
+   public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand evictFqnCommand) throws Throwable;
 
    /*
      equiv of old:

Deleted: core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictFqnCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictFqnCommand.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictFqnCommand.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -1,89 +0,0 @@
-package org.jboss.cache.commands.cachedata;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.commands.state.DataVersionCommand;
-import org.jboss.cache.commands.BaseCommand;
-import org.jboss.cache.commands.CommandsVisitor;
-import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.invocation.CacheData;
-import org.jboss.cache.optimistic.DataVersion;
-
-/**
- * Implements functionality defined by {@link org.jboss.cache.CacheSPI#evict(org.jboss.cache.Fqn)}
- *
- * @author Mircea.Markus at jboss.com
- * @since 2.2
- */
-public class EvictFqnCommand extends BaseCommand implements DataVersionCommand
-{
-   public static final int METHOD_ID = 8;
-   public static final int VERSIONED_METHOD_ID = 9;
-
-   /* dependencies*/
-   protected CacheData cacheData;
-
-   /* parameters*/
-   protected Fqn fqn;
-   protected DataVersion dataVersion;
-
-   public EvictFqnCommand(Fqn fqn)
-   {
-      this.fqn = fqn;
-   }
-
-   @Inject
-   public void initialize(CacheData cacheData)
-   {
-      this.cacheData = cacheData;
-   }
-
-   public Object perform(InvocationContext ctx)
-   {
-      return cacheData.evict(fqn);
-   }
-
-   public Object accept(InvocationContext ctx, CommandsVisitor handler) throws Throwable
-   {
-      return handler.handleEvictFqnCommand(ctx, this);
-   }
-
-   public int getCommandId()
-   {
-      return isVersioned() ? VERSIONED_METHOD_ID : METHOD_ID;
-   }
-
-   public Fqn getFqn()
-   {
-      return fqn;
-   }
-
-   public DataVersion getDataVersion()
-   {
-      return dataVersion;
-   }
-
-   public void setDataVersion(DataVersion dataVersion)
-   {
-      this.dataVersion = dataVersion;
-   }
-
-   public boolean isVersioned()
-   {
-      return dataVersion != null;
-   }
-
-   public Object[] getParameters()
-   {
-      if (isVersioned())
-         return new Object[]{fqn, dataVersion};
-      else
-         return new Object[]{fqn};
-   }
-
-   public void setState(int commandId, Object[] args)
-   {
-      fqn = (Fqn) args[0];
-      if (commandId == VERSIONED_METHOD_ID) dataVersion = (DataVersion) args[1];
-   }
-}

Copied: core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictNodeCommand.java (from rev 5551, core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictFqnCommand.java)
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictNodeCommand.java	                        (rev 0)
+++ core/trunk/src/main/java/org/jboss/cache/commands/cachedata/EvictNodeCommand.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -0,0 +1,89 @@
+package org.jboss.cache.commands.cachedata;
+
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.BaseCommand;
+import org.jboss.cache.commands.CommandsVisitor;
+import org.jboss.cache.commands.state.DataVersionCommand;
+import org.jboss.cache.factories.annotations.Inject;
+import org.jboss.cache.invocation.CacheData;
+import org.jboss.cache.optimistic.DataVersion;
+
+/**
+ * Implements functionality defined by {@link org.jboss.cache.CacheSPI#evict(org.jboss.cache.Fqn)}
+ *
+ * @author Mircea.Markus at jboss.com
+ * @since 2.2
+ */
+public class EvictNodeCommand extends BaseCommand implements DataVersionCommand
+{
+   public static final int METHOD_ID = 8;
+   public static final int VERSIONED_METHOD_ID = 9;
+
+   /* dependencies*/
+   protected CacheData cacheData;
+
+   /* parameters*/
+   protected Fqn fqn;
+   protected DataVersion dataVersion;
+
+   public EvictNodeCommand(Fqn fqn)
+   {
+      this.fqn = fqn;
+   }
+
+   @Inject
+   public void initialize(CacheData cacheData)
+   {
+      this.cacheData = cacheData;
+   }
+
+   public Object perform(InvocationContext ctx)
+   {
+      return cacheData.evict(fqn);
+   }
+
+   public Object accept(InvocationContext ctx, CommandsVisitor handler) throws Throwable
+   {
+      return handler.handleEvictFqnCommand(ctx, this);
+   }
+
+   public int getCommandId()
+   {
+      return isVersioned() ? VERSIONED_METHOD_ID : METHOD_ID;
+   }
+
+   public Fqn getFqn()
+   {
+      return fqn;
+   }
+
+   public DataVersion getDataVersion()
+   {
+      return dataVersion;
+   }
+
+   public void setDataVersion(DataVersion dataVersion)
+   {
+      this.dataVersion = dataVersion;
+   }
+
+   public boolean isVersioned()
+   {
+      return dataVersion != null;
+   }
+
+   public Object[] getParameters()
+   {
+      if (isVersioned())
+         return new Object[]{fqn, dataVersion};
+      else
+         return new Object[]{fqn};
+   }
+
+   public void setState(int commandId, Object[] args)
+   {
+      fqn = (Fqn) args[0];
+      if (commandId == VERSIONED_METHOD_ID) dataVersion = (DataVersion) args[1];
+   }
+}

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-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/commands/remote/DataGravitationCleanupCommand.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -7,11 +7,12 @@
 import org.jboss.cache.NodeSPI;
 import org.jboss.cache.buddyreplication.BuddyManager;
 import org.jboss.cache.commands.BaseCommand;
-import org.jboss.cache.commands.*;
+import org.jboss.cache.commands.CommandsFactory;
+import org.jboss.cache.commands.CommandsVisitor;
+import org.jboss.cache.commands.cachedata.EvictNodeCommand;
+import org.jboss.cache.commands.cachedata.RemoveNodeCommand;
+import org.jboss.cache.commands.functional.TxCacheCommand;
 import org.jboss.cache.commands.state.GlobalTransactionCommand;
-import org.jboss.cache.commands.functional.TxCacheCommand;
-import org.jboss.cache.commands.cachedata.RemoveNodeCommand;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
 import org.jboss.cache.factories.annotations.Inject;
 import org.jboss.cache.invocation.CacheData;
 import org.jboss.cache.invocation.CacheTransactionHelper;
@@ -134,7 +135,7 @@
       Set<Fqn> toEvict = cacheData.getNodesForEviction(fqn, true);
       for (Fqn aFqn : toEvict)
       {
-         EvictFqnCommand evictFqnCommand = new EvictFqnCommand(aFqn);
+         EvictNodeCommand evictFqnCommand = new EvictNodeCommand(aFqn);
          invoker.invoke(evictFqnCommand);
       }
    }

Modified: core/trunk/src/main/java/org/jboss/cache/commands/visitors/AbstractCommandsVisitor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/visitors/AbstractCommandsVisitor.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/commands/visitors/AbstractCommandsVisitor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -1,15 +1,22 @@
 package org.jboss.cache.commands.visitors;
 
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.CacheCommand;
+import org.jboss.cache.commands.CommandsVisitor;
+import org.jboss.cache.commands.cachedata.*;
 import org.jboss.cache.commands.channel.BlockChannelCommand;
 import org.jboss.cache.commands.channel.UnblockChannelCommand;
-import org.jboss.cache.commands.remote.*;
+import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ClusteredGetCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.GravitateDataCommand;
+import org.jboss.cache.commands.remote.RemoveFromBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
+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.tx.CommitCommand;
-import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
-import org.jboss.cache.commands.cachedata.*;
-import org.jboss.cache.commands.*;
-import org.jboss.cache.InvocationContext;
 
 import java.util.Collection;
 
@@ -39,7 +46,7 @@
       return handleDefault(ctx, command);
    }
 
-   public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+   public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
    {
       return handleDefault(ctx, command);
    }
@@ -161,7 +168,7 @@
 
    public void visitCollection(InvocationContext ctx, Collection<? extends CacheCommand> toVisit) throws Throwable
    {
-      for (CacheCommand command: toVisit)
+      for (CacheCommand command : toVisit)
       {
          command.accept(ctx, this);
       }
@@ -169,9 +176,9 @@
 
    public void visitCollectionGeneric(InvocationContext ctx, Collection toVisit) throws Throwable
    {
-      for (Object command: toVisit)
+      for (Object command : toVisit)
       {
-         ((CacheCommand)command).accept(ctx, this);
+         ((CacheCommand) command).accept(ctx, this);
       }
    }
 }

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/CacheMgmtInterceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -22,12 +22,12 @@
 package org.jboss.cache.interceptors;
 
 import org.jboss.cache.InvocationContext;
-import org.jboss.cache.factories.annotations.Inject;
-import org.jboss.cache.interceptors.base.ChainedInterceptor;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
+import org.jboss.cache.commands.cachedata.EvictNodeCommand;
 import org.jboss.cache.commands.cachedata.GetKeyValueCommand;
 import org.jboss.cache.commands.cachedata.PutDataMapCommand;
 import org.jboss.cache.commands.cachedata.PutKeyValueCommand;
+import org.jboss.cache.factories.annotations.Inject;
+import org.jboss.cache.interceptors.base.ChainedInterceptor;
 import org.jboss.cache.invocation.CacheData;
 
 import java.util.HashMap;
@@ -60,7 +60,7 @@
    }
 
    @Override
-   public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+   public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
    {
       Object returnValue = invokeNextInterceptor(ctx, command);
       m_evictions++;
@@ -77,7 +77,8 @@
       {
          m_miss_times = m_miss_times + (t2 - t1);
          m_misses++;
-      } else
+      }
+      else
       {
          m_hit_times = m_hit_times + (t2 - t1);
          m_hits++;

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/EvictionInterceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -7,9 +7,20 @@
  */
 package org.jboss.cache.interceptors;
 
-import org.jboss.cache.*;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
-import org.jboss.cache.commands.cachedata.*;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeSPI;
+import org.jboss.cache.Region;
+import org.jboss.cache.RegionManager;
+import org.jboss.cache.commands.cachedata.EvictNodeCommand;
+import org.jboss.cache.commands.cachedata.GetDataMapCommand;
+import org.jboss.cache.commands.cachedata.GetKeyValueCommand;
+import org.jboss.cache.commands.cachedata.GetNodeCommand;
+import org.jboss.cache.commands.cachedata.PutDataMapCommand;
+import org.jboss.cache.commands.cachedata.PutKeyValueCommand;
+import org.jboss.cache.commands.cachedata.RemoveDataCommand;
+import org.jboss.cache.commands.cachedata.RemoveKeyCommand;
+import org.jboss.cache.commands.cachedata.RemoveNodeCommand;
 import org.jboss.cache.eviction.EvictedEventNode;
 import org.jboss.cache.eviction.NodeEventType;
 import org.jboss.cache.factories.annotations.Inject;
@@ -49,7 +60,7 @@
    }
 
    @Override
-   public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+   public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
    {
       Fqn fqn = command.getFqn();
       Object retVal = invokeNextInterceptor(ctx, command);
@@ -133,7 +144,7 @@
    @Override
    public Object handleGetNodeCommand(InvocationContext ctx, GetNodeCommand command) throws Throwable
    {
-      Object retVal = invokeNextInterceptor(ctx,command);
+      Object retVal = invokeNextInterceptor(ctx, command);
       return handleGetNodeOrDataCommands(ctx, retVal, command.getFqn());
    }
 
@@ -159,14 +170,14 @@
    @Override
    public Object handleGetDataMapCommand(InvocationContext ctx, GetDataMapCommand command) throws Throwable
    {
-      Object retVal = invokeNextInterceptor(ctx,command);
+      Object retVal = invokeNextInterceptor(ctx, command);
       return handleGetNodeOrDataCommands(ctx, retVal, command.getFqn());
    }
 
    @Override
    public Object handleGetKeyValueCommand(InvocationContext ctx, GetKeyValueCommand command) throws Throwable
    {
-      Object retVal = invokeNextInterceptor(ctx,command);
+      Object retVal = invokeNextInterceptor(ctx, command);
       Fqn fqn = command.getFqn();
       if (retVal == null)
       {
@@ -185,7 +196,7 @@
    @Override
    public Object handleRemoveNodeCommand(InvocationContext ctx, RemoveNodeCommand command) throws Throwable
    {
-      Object retVal = invokeNextInterceptor(ctx,command);
+      Object retVal = invokeNextInterceptor(ctx, command);
       if (command.getFqn() != null && !canIgnoreEvent(command.getFqn(), NodeEventType.REMOVE_NODE_EVENT))
       {
          registerEvictionEventToRegionManager(new EvictedEventNode(command.getFqn(), NodeEventType.REMOVE_NODE_EVENT), ctx);
@@ -196,7 +207,7 @@
    @Override
    public Object handleRemoveDataCommand(InvocationContext ctx, RemoveDataCommand command) throws Throwable
    {
-      Object retVal = invokeNextInterceptor(ctx,command);
+      Object retVal = invokeNextInterceptor(ctx, command);
       if (command.getFqn() != null && !canIgnoreEvent(command.getFqn(), NodeEventType.REMOVE_NODE_EVENT))
       {
          registerEvictionEventToRegionManager(new EvictedEventNode(command.getFqn(), NodeEventType.REMOVE_NODE_EVENT), ctx);

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-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/Interceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -27,12 +27,14 @@
 import org.jboss.cache.InvocationContext;
 import org.jboss.cache.NodeSPI;
 import org.jboss.cache.commands.CacheCommand;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
-import org.jboss.cache.commands.cachedata.InvalidateCommand;
 import org.jboss.cache.commands.cachedata.*;
 import org.jboss.cache.commands.channel.BlockChannelCommand;
 import org.jboss.cache.commands.channel.UnblockChannelCommand;
-import org.jboss.cache.commands.remote.*;
+import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.RemoveFromBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
 import org.jboss.cache.commands.tx.CommitCommand;
 import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
 import org.jboss.cache.commands.tx.PrepareCommand;
@@ -217,7 +219,7 @@
          case MethodDeclarations.evictNodeMethodLocal_id:
          case MethodDeclarations.evictVersionedNodeMethodLocal_id:
          {
-            return next.handleEvictFqnCommand(ctx, (EvictFqnCommand) command);
+            return next.handleEvictFqnCommand(ctx, (EvictNodeCommand) command);
          }
          case MethodDeclarations.invalidateMethodLocal_id:
          {

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/OptimisticReplicationInterceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -11,11 +11,15 @@
 import org.jboss.cache.InvocationContext;
 import org.jboss.cache.commands.CacheCommand;
 import org.jboss.cache.commands.CommandsFactory;
+import org.jboss.cache.commands.cachedata.EvictNodeCommand;
+import org.jboss.cache.commands.cachedata.PutDataMapCommand;
+import org.jboss.cache.commands.cachedata.PutKeyValueCommand;
+import org.jboss.cache.commands.cachedata.RemoveDataCommand;
+import org.jboss.cache.commands.cachedata.RemoveKeyCommand;
+import org.jboss.cache.commands.cachedata.RemoveNodeCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.GravitateDataCommand;
 import org.jboss.cache.commands.state.DataVersionCommand;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
-import org.jboss.cache.commands.remote.GravitateDataCommand;
-import org.jboss.cache.commands.cachedata.*;
-import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
 import org.jboss.cache.commands.tx.CommitCommand;
 import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
 import org.jboss.cache.commands.tx.RollbackCommand;
@@ -292,9 +296,9 @@
          return command;
       }
 
-      public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+      public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
       {
-         EvictFqnCommand clone = commandsFactory.buildEvictFqnCommand(command.getFqn());
+         EvictNodeCommand clone = commandsFactory.buildEvictFqnCommand(command.getFqn());
          return setDataVersion(clone, command.getFqn());
       }
 

Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PassivationInterceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -3,13 +3,13 @@
 import org.jboss.cache.Fqn;
 import org.jboss.cache.InvocationContext;
 import org.jboss.cache.NodeSPI;
+import org.jboss.cache.commands.cachedata.EvictNodeCommand;
+import org.jboss.cache.config.Configuration;
 import org.jboss.cache.factories.annotations.Inject;
+import org.jboss.cache.interceptors.base.ChainedInterceptor;
 import org.jboss.cache.invocation.CacheData;
-import org.jboss.cache.config.Configuration;
+import org.jboss.cache.loader.CacheLoader;
 import org.jboss.cache.notifications.Notifier;
-import org.jboss.cache.interceptors.base.ChainedInterceptor;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
-import org.jboss.cache.loader.CacheLoader;
 
 import java.util.Collections;
 import java.util.HashMap;
@@ -40,13 +40,13 @@
       this.configuration = configuration;
       this.cacheData = cacheData;
    }
-   
+
    /**
     * Notifies the cache instance listeners that the evicted node is about to
     * be passivated and stores the evicted node and its attributes back to the
     * store using the CacheLoader.
     */
-   public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand evictFqnCommand) throws Throwable
+   public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand evictFqnCommand) throws Throwable
    {
       Fqn fqn = evictFqnCommand.getFqn();
       try

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-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/PessimisticLockInterceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -9,7 +9,6 @@
 import org.jboss.cache.Fqn;
 import org.jboss.cache.InvocationContext;
 import org.jboss.cache.NodeSPI;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
 import org.jboss.cache.commands.cachedata.*;
 import org.jboss.cache.commands.tx.CommitCommand;
 import org.jboss.cache.commands.tx.PrepareCommand;
@@ -278,7 +277,7 @@
       return invokeNextInterceptor(ctx, command);
    }
 
-   public Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+   public Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
    {
       lockManager.acquireLocksWithTimeout(ctx, command.getFqn(), NodeLock.LockType.WRITE, false, true, false, false, null, false);
       return invokeNextInterceptor(ctx, command);

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-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/base/SkipCheckChainedInterceptor.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -1,24 +1,27 @@
 package org.jboss.cache.interceptors.base;
 
 import org.jboss.cache.InvocationContext;
+import org.jboss.cache.commands.CacheCommand;
 import org.jboss.cache.commands.cachedata.*;
-import org.jboss.cache.commands.cachedata.EvictFqnCommand;
-import org.jboss.cache.commands.cachedata.InvalidateCommand;
-import org.jboss.cache.commands.remote.GravitateDataCommand;
-import org.jboss.cache.commands.CacheCommand;
 import org.jboss.cache.commands.channel.BlockChannelCommand;
 import org.jboss.cache.commands.channel.UnblockChannelCommand;
-import org.jboss.cache.commands.remote.*;
+import org.jboss.cache.commands.remote.AnnounceBuddyPoolNameCommand;
+import org.jboss.cache.commands.remote.AssignToBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ClusteredGetCommand;
+import org.jboss.cache.commands.remote.DataGravitationCleanupCommand;
+import org.jboss.cache.commands.remote.GravitateDataCommand;
+import org.jboss.cache.commands.remote.RemoveFromBuddyGroupCommand;
+import org.jboss.cache.commands.remote.ReplicateCommand;
+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.tx.CommitCommand;
-import org.jboss.cache.commands.tx.OptimisticPrepareCommand;
 
 /**
  * Chained command interceptor that performs a skip check before calling each handler method.
  * This is usefull in scenarios where all handlers methods should be skiped if the same condition is true.
  * E.g. CacheStoreIntecepto would skip all method calls if we have a shared storage and this is not the designated node.
- * 
+ *
  * @author Mircea.Markus at jboss.com
  * @since 2.2
  */
@@ -80,7 +83,7 @@
       return executeAll(ctx, command);
    }
 
-   public final Object handleEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+   public final Object handleEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
    {
       if (skipInterception(ctx))
       {
@@ -89,7 +92,7 @@
       return executeEvictFqnCommand(ctx, command);
    }
 
-   public Object executeEvictFqnCommand(InvocationContext ctx, EvictFqnCommand command) throws Throwable
+   public Object executeEvictFqnCommand(InvocationContext ctx, EvictNodeCommand command) throws Throwable
    {
       return executeAll(ctx, command);
    }

Modified: core/trunk/src/test/java/org/jboss/cache/marshall/BackwardCompatTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/marshall/BackwardCompatTest.java	2008-04-14 14:52:38 UTC (rev 5555)
+++ core/trunk/src/test/java/org/jboss/cache/marshall/BackwardCompatTest.java	2008-04-14 14:54:20 UTC (rev 5556)
@@ -95,8 +95,8 @@
       commands.put(OptimisticPrepareCommand.METHOD_ID, OptimisticPrepareCommand.class);
       commands.put(PrepareCommand.METHOD_ID, PrepareCommand.class);
       commands.put(RollbackCommand.METHOD_ID, RollbackCommand.class);
-      commands.put(EvictFqnCommand.METHOD_ID, EvictFqnCommand.class);
-      commands.put(EvictFqnCommand.VERSIONED_METHOD_ID, EvictFqnCommand.class);
+      commands.put(EvictNodeCommand.METHOD_ID, EvictNodeCommand.class);
+      commands.put(EvictNodeCommand.VERSIONED_METHOD_ID, EvictNodeCommand.class);
       commands.put(GravitateDataCommand.METHOD_ID, GravitateDataCommand.class);
       commands.put(InvalidateCommand.METHOD_ID, InvalidateCommand.class);
    }




More information about the jbosscache-commits mailing list