public class GetKeyValueCommand extends AbstractDataCommand
Cache.get(String, Object)
This is the equivalent of the old MethodCallDefinitions.getKeyValueMethodLocal method call from 2.1.x.
| Modifier and Type | Field and Description |
|---|---|
static int |
METHOD_ID |
dataContainer, fqn| Constructor and Description |
|---|
GetKeyValueCommand() |
GetKeyValueCommand(Fqn fqn,
Object key,
boolean sendNodeEvent) |
| 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.
|
Object |
getKey() |
Object[] |
getParameters()
Basic versions of these methods
|
int |
hashCode() |
void |
initialize(DataContainer dataContainer,
Notifier notifier) |
boolean |
isSendNodeEvent() |
Object |
perform(InvocationContext ctx)
Retrieves the value stored under a specified key in a node referenced by the specified Fqn.
|
void |
setKey(Object key) |
void |
setParameters(int commandId,
Object[] args)
Basic versions of these methods
|
String |
toString() |
getFqn, initializepublic static final int METHOD_ID
public void initialize(DataContainer dataContainer, Notifier notifier)
public Object perform(InvocationContext ctx)
ctx - invocation contextpublic Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommandctx - invocation contextvisitor - visitor to acceptThrowable - in the event of problemspublic Object getKey()
public boolean isSendNodeEvent()
public void setKey(Object key)
public int getCommandId()
ReplicableCommandpublic Object[] getParameters()
AbstractDataCommandgetParameters in interface ReplicableCommandgetParameters in class AbstractDataCommandpublic void setParameters(int commandId,
Object[] args)
AbstractDataCommandsetParameters in interface ReplicableCommandsetParameters in class AbstractDataCommandcommandId - 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 AbstractDataCommandpublic int hashCode()
hashCode in class AbstractDataCommandpublic String toString()
toString in class AbstractDataCommandCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.