org.jboss.cache.commands.read
Class AbstractDataCommand

java.lang.Object
  extended by org.jboss.cache.commands.read.AbstractDataCommand
All Implemented Interfaces:
DataCommand, ReplicableCommand, VisitableCommand
Direct Known Subclasses:
AbstractVersionedDataCommand, CreateNodeCommand, EvictCommand, ExistsCommand, GetChildrenNamesCommand, GetDataMapCommand, GetKeysCommand, GetKeyValueCommand, GetNodeCommand, GravitateDataCommand, InvalidateCommand, MoveCommand

public abstract class AbstractDataCommand
extends Object
implements DataCommand

An abstract class providing basic functionality of all DataCommands.

Since:
2.2.0
Author:
Manik Surtani (manik AT jboss DOT org)

Field Summary
protected  DataContainer dataContainer
           
protected  Fqn fqn
           
 
Constructor Summary
AbstractDataCommand()
           
 
Method Summary
 boolean equals(Object o)
           
 Fqn getFqn()
          Returns the Fqn of the node on which this command operates.
 Object[] getParameters()
          Basic versions of these methods
 int hashCode()
           
 void initialize(DataContainer dataContainer)
           
 void setParameters(int commandId, Object[] args)
          Basic versions of these methods
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.cache.commands.VisitableCommand
acceptVisitor
 
Methods inherited from interface org.jboss.cache.commands.ReplicableCommand
getCommandId, perform
 

Field Detail

fqn

protected Fqn fqn

dataContainer

protected DataContainer dataContainer
Constructor Detail

AbstractDataCommand

public AbstractDataCommand()
Method Detail

initialize

public void initialize(DataContainer dataContainer)

getFqn

public Fqn getFqn()
Description copied from interface: DataCommand
Returns the Fqn of the node on which this command operates.

Specified by:
getFqn in interface DataCommand
Returns:
an Fqn

getParameters

public Object[] getParameters()
Basic versions of these methods

Specified by:
getParameters in interface ReplicableCommand
Returns:
an object array of arguments, compatible with pre-2.2.0 MethodCall args.

setParameters

public void setParameters(int commandId,
                          Object[] args)
Basic versions of these methods

Specified by:
setParameters in interface ReplicableCommand
Parameters:
commandId - command id to set. This is usually unused but *could* be used in the event of a command having multiple IDs, such as PutKeyValueCommand.
args - object array of args

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.