org.jboss.cache.commands.read
Class ExistsCommand
java.lang.Object
   org.jboss.cache.commands.read.AbstractDataCommand
org.jboss.cache.commands.read.AbstractDataCommand
       org.jboss.cache.commands.read.ExistsCommand
org.jboss.cache.commands.read.ExistsCommand
- All Implemented Interfaces: 
- DataCommand, ReplicableCommand, VisitableCommand
- public class ExistsCommand 
- extends AbstractDataCommand
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).
 
 Specifically used by the ClusteredCacheLoader to
 implement CacheLoader.exists(org.jboss.cache.Fqn)
 
 This is the equivalent of the old MethodCallDefinitions.existsMethod method call from 2.1.x.
 
- Since:
- 2.2.0
- Author:
- Mircea.Markus@jboss.com
 
 
 
 
 
 
METHOD_ID
public static final int METHOD_ID
- See Also:
- Constant Field Values
ExistsCommand
public ExistsCommand(Fqn fqn)
ExistsCommand
public ExistsCommand()
perform
public Object perform(InvocationContext ctx)
- Checks whether a node represented by a given Fqn exists.
 Deleted and invalid nodes are not considered.
 
- 
- Parameters:
- ctx- invocation context
- Returns:
- true if the node exists, false otherwise.
 
acceptVisitor
public Object acceptVisitor(InvocationContext ctx,
                            Visitor visitor)
                     throws Throwable
- Description copied from interface: VisitableCommand
- Accept a visitor, and return the result of accepting this visitor.
 
- 
- Parameters:
- ctx- invocation context
- visitor- visitor to accept
- Returns:
- arbitrary return value
- Throws:
- Throwable- in the event of problems
 
getCommandId
public int getCommandId()
- Description copied from interface: ReplicableCommand
- Used by marshallers to convert this command into an id for streaming.
 
- 
- Returns:
- the method id of this command.  This is compatible with pre-2.2.0 MethodCall ids.
 
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.