Author: manik.surtani(a)jboss.com
Date: 2008-04-25 21:52:32 -0400 (Fri, 25 Apr 2008)
New Revision: 5700
Removed:
core/trunk/src/main/java/org/jboss/cache/commands/CacheCommand.java
core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoteExistsNodeCommand.java
Log:
refactoring
Deleted: core/trunk/src/main/java/org/jboss/cache/commands/CacheCommand.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/commands/CacheCommand.java 2008-04-26
01:25:29 UTC (rev 5699)
+++ core/trunk/src/main/java/org/jboss/cache/commands/CacheCommand.java 2008-04-26
01:52:32 UTC (rev 5700)
@@ -1,15 +0,0 @@
-package org.jboss.cache.commands;
-
-import org.jboss.cache.InvocationContext;
-
-/**
- * @author Mircea.Markus(a)jboss.com
- * @since 2.2
- * todo - reduce dependencies from CacheSPI many commands depend on CacheSPI only
for invoceation ctxt. inject ctxt rather than entire CacheSPI
- */
-public interface CacheCommand extends Cloneable
-{
- Object perform(InvocationContext ctx) throws Throwable;
-
- Object accept(InvocationContext ctx, CommandsVisitor handler) throws Throwable;
-}
Deleted:
core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoteExistsNodeCommand.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoteExistsNodeCommand.java 2008-04-26
01:25:29 UTC (rev 5699)
+++
core/trunk/src/main/java/org/jboss/cache/commands/remote/RemoteExistsNodeCommand.java 2008-04-26
01:52:32 UTC (rev 5700)
@@ -1,53 +0,0 @@
-package org.jboss.cache.commands.remote;
-
-import org.jboss.cache.Fqn;
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.Node;
-import org.jboss.cache.commands.CommandsVisitor;
-import org.jboss.cache.commands.state.BaseCacheDataCommand;
-
-/**
- * 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(a)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 BaseCacheDataCommand
-{
- 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 accept(InvocationContext ctx, CommandsVisitor handler) throws Throwable
- {
- return handler.handleExistsNodeCommand(ctx, this);
- }
-
- public int getCommandId()
- {
- return METHOD_ID;
- }
-
- @Override
- public String toString()
- {
- return "RemoteExistsNodeCommand{}";
- }
-}
Show replies by date