public class GetKeyValueCommand extends AbstractDataCommand
Map.get(Object)
and
Map.containsKey(Object)
operationsModifier and Type | Field and Description |
---|---|
static byte |
COMMAND_ID |
key
flags
Constructor and Description |
---|
GetKeyValueCommand() |
GetKeyValueCommand(Object key,
CacheNotifier notifier,
Set<Flag> flags) |
Modifier and Type | Method and Description |
---|---|
Object |
acceptVisitor(InvocationContext ctx,
Visitor visitor)
Accept a visitor, and return the result of accepting this visitor.
|
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
Object[] |
getParameters()
Used by marshallers to stream this command across a network
|
Object |
perform(InvocationContext ctx)
Performs the primary function of the command.
|
void |
setParameters(int commandId,
Object[] parameters)
Used by the
CommandsFactory to create a command from raw data read off a stream. |
void |
setReturnCacheEntry(boolean returnCacheEntry)
Will make this method to return an
CacheEntry instead of the corresponding value associated with the key. |
equals, getKey, hashCode, ignoreCommandOnStatus, isReturnValueExpected, setKey, shouldInvoke, toString
getFlags, hasFlag, setFlags
public static final byte COMMAND_ID
public GetKeyValueCommand(Object key, CacheNotifier notifier, Set<Flag> flags)
public GetKeyValueCommand()
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic void setReturnCacheEntry(boolean returnCacheEntry)
CacheEntry
instead of the corresponding value associated with the key.public Object perform(InvocationContext ctx) throws Throwable
ReplicableCommand
ctx
- invocation contextThrowable
- in the event of problems.public byte getCommandId()
ReplicableCommand
public void setParameters(int commandId, Object[] parameters)
ReplicableCommand
CommandsFactory
to create a command from raw data read off a stream.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
.parameters
- object array of argspublic Object[] getParameters()
ReplicableCommand
getParameters
in interface ReplicableCommand
getParameters
in class AbstractDataCommand
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.