[jbosscache-commits] JBoss Cache SVN: r5721 - in core/trunk/src/main/java/org/jboss/cache/commands: write and 1 other directory.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Mon Apr 28 10:03:57 EDT 2008


Author: manik.surtani at jboss.com
Date: 2008-04-28 10:03:57 -0400 (Mon, 28 Apr 2008)
New Revision: 5721

Removed:
   core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsNodeCommand.java
   core/trunk/src/main/java/org/jboss/cache/commands/write/EvictNodeCommand.java
Log:


Deleted: core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsNodeCommand.java	2008-04-28 14:00:46 UTC (rev 5720)
+++ core/trunk/src/main/java/org/jboss/cache/commands/read/RemoteExistsNodeCommand.java	2008-04-28 14:03:57 UTC (rev 5721)
@@ -1,52 +0,0 @@
-package org.jboss.cache.commands.read;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.Node;
-import org.jboss.cache.commands.Visitor;
-
-/**
- * Checks whether a given node exists in current in-memory state of the cache.
- * Does not acquire any locks in doing so (result may be dirty read). Does
- * not attempt to load nodes from a cache loader (may return false if a
- * node has been evicted).
- *
- * @author Mircea.Markus at jboss.com
- * @since 2.2
- *        todo - this is only used when remote cache calls exists, nut sure it is necessary to have it as a command
- */
-public class RemoteExistsNodeCommand extends AbstractDataCommand
-{
-   public static final int METHOD_ID = 16;
-
-   public RemoteExistsNodeCommand()
-   {
-   }
-
-   public RemoteExistsNodeCommand(Fqn fqn)
-   {
-      this.fqn = fqn;
-   }
-
-   public Object perform(InvocationContext ctx)
-   {
-      Node n = cacheData.peek(fqn, false);
-      return n != null;
-   }
-
-   public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
-   {
-      return visitor.handleExistsNodeCommand(ctx, this);
-   }
-
-   public int getCommandId()
-   {
-      return METHOD_ID;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "RemoteExistsNodeCommand{}";
-   }
-}

Deleted: core/trunk/src/main/java/org/jboss/cache/commands/write/EvictNodeCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/write/EvictNodeCommand.java	2008-04-28 14:00:46 UTC (rev 5720)
+++ core/trunk/src/main/java/org/jboss/cache/commands/write/EvictNodeCommand.java	2008-04-28 14:03:57 UTC (rev 5721)
@@ -1,60 +0,0 @@
-package org.jboss.cache.commands.write;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.commands.Visitor;
-
-/**
- * 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 AbstractVersionedDataCommand
-{
-   public static final int METHOD_ID = 8;
-   public static final int VERSIONED_METHOD_ID = 9;
-
-   public EvictNodeCommand(Fqn fqn)
-   {
-      this.fqn = fqn;
-   }
-
-   public Object perform(InvocationContext ctx)
-   {
-      notifier.notifyNodeEvicted(fqn, true, ctx);
-      boolean evicted = cacheData.evict(fqn);
-      notifier.notifyNodeEvicted(fqn, false, ctx);
-      return evicted;
-   }
-
-   public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
-   {
-      return visitor.handleEvictFqnCommand(ctx, this);
-   }
-
-   public int getCommandId()
-   {
-      return isVersioned() ? VERSIONED_METHOD_ID : METHOD_ID;
-   }
-
-   @Override
-   protected boolean isVersionedId(int id)
-   {
-      return VERSIONED_METHOD_ID == id;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "EvictNodeCommand{" +
-            "fqn=" + fqn +
-            ", dataVersion=" + dataVersion +
-            "}";
-   }
-
-   public void rollback()
-   {
-      // this is a no-op.
-   }
-}




More information about the jbosscache-commits mailing list