public class MoveCommand extends AbstractDataCommand implements WriteCommand
Cache.move(org.jboss.cache.Fqn, org.jboss.cache.Fqn)
Modifier and Type | Field and Description |
---|---|
protected GlobalTransaction |
globalTransaction |
protected static org.apache.commons.logging.Log |
log |
static int |
METHOD_ID |
protected Notifier |
notifier |
protected Fqn |
to |
protected static boolean |
trace |
dataContainer, fqn
Constructor and Description |
---|
MoveCommand() |
MoveCommand(Fqn from,
Fqn to) |
Modifier and Type | Method and Description |
---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
boolean |
equals(Object o) |
int |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
GlobalTransaction |
getGlobalTransaction() |
Object[] |
getParameters()
Basic versions of these methods
|
Fqn |
getTo() |
int |
hashCode() |
void |
initialize(Notifier notifier,
DataContainer dataContainer) |
Object |
perform(InvocationContext ctx)
Moves a node, from fqn to to, and returns null.
|
void |
setGlobalTransaction(GlobalTransaction globalTransaction)
Sets a GlobalTransaction on this command.
|
void |
setParameters(int commandId,
Object[] args)
Basic versions of these methods
|
String |
toString() |
getFqn, initialize
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFqn
public static final int METHOD_ID
protected static final org.apache.commons.logging.Log log
protected static final boolean trace
protected Notifier notifier
protected Fqn to
protected GlobalTransaction globalTransaction
public void initialize(Notifier notifier, DataContainer dataContainer)
public GlobalTransaction getGlobalTransaction()
getGlobalTransaction
in interface WriteCommand
public void setGlobalTransaction(GlobalTransaction globalTransaction)
WriteCommand
setGlobalTransaction
in interface WriteCommand
globalTransaction
- global transaction to setpublic Object perform(InvocationContext ctx)
perform
in interface ReplicableCommand
ctx
- invocation contextpublic Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
acceptVisitor
in interface VisitableCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic Fqn getTo()
public int getCommandId()
ReplicableCommand
getCommandId
in interface ReplicableCommand
public Object[] getParameters()
AbstractDataCommand
getParameters
in interface ReplicableCommand
getParameters
in class AbstractDataCommand
public void setParameters(int commandId, Object[] args)
AbstractDataCommand
setParameters
in interface ReplicableCommand
setParameters
in class AbstractDataCommand
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 argspublic boolean equals(Object o)
equals
in class AbstractDataCommand
public int hashCode()
hashCode
in class AbstractDataCommand
public String toString()
toString
in class AbstractDataCommand
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.