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,
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
|
InternalCacheEntry |
getRemotelyFetchedValue()
If the cache needs to go remotely in order to obtain the value associated to this key, then the remote value
is stored in this field.
|
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 |
setRemotelyFetchedValue(InternalCacheEntry remotelyFetchedValue) |
equals, getKey, hashCode, ignoreCommandOnStatus, isReturnValueExpected, setKey, shouldInvoke, toString
getFlags, getTopologyId, hasFlag, setFlags, setFlags, setTopologyId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getTopologyId, setTopologyId
public static final byte COMMAND_ID
public Object acceptVisitor(InvocationContext ctx, Visitor visitor) throws Throwable
VisitableCommand
ctx
- invocation contextvisitor
- visitor to acceptThrowable
- in the event of problemspublic 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
public void setRemotelyFetchedValue(InternalCacheEntry remotelyFetchedValue)
getRemotelyFetchedValue()
public InternalCacheEntry getRemotelyFetchedValue()
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.