public class ClusteredGetCommand extends BaseClusteredReadCommand implements SegmentSpecificCommand
VisitableCommand
and hence not passed up the
interceptor chain.
Modifier and Type | Field and Description |
---|---|
static byte |
COMMAND_ID |
topologyId
cacheName, origin
Constructor and Description |
---|
ClusteredGetCommand(ByteString cacheName) |
ClusteredGetCommand(Object key,
ByteString cacheName,
int segment,
long flags) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
byte |
getCommandId()
Used by marshallers to convert this command into an id for streaming.
|
GlobalTransaction |
getGlobalTransaction()
Deprecated.
|
Object |
getKey() |
int |
getSegment()
Returns the segment that this key maps to.
|
int |
hashCode() |
CompletionStage<?> |
invokeAsync(ComponentRegistry componentRegistry)
Invokes a logical "get(key)" on a remote cache and returns results.
|
boolean |
isReturnValueExpected()
If true, a return value will be provided when performed remotely.
|
boolean |
isWrite() |
void |
readFrom(ObjectInput input)
Reads this instance from the stream written by
ReplicableCommand.writeTo(ObjectOutput) . |
void |
setWrite(boolean write) |
String |
toString() |
void |
writeTo(ObjectOutput output)
Writes this instance to the
ObjectOutput . |
getFlagsBitSet, getTopologyId, hasAnyFlag, printFlags, setFlagsBitSet, setTopologyId
getCacheName, getOrigin, setOrigin
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
extractSegment
canBlock, invoke, invokeAsync, isSuccessful, setOrigin
public static final byte COMMAND_ID
public ClusteredGetCommand(ByteString cacheName)
public ClusteredGetCommand(Object key, ByteString cacheName, int segment, long flags)
public CompletionStage<?> invokeAsync(ComponentRegistry componentRegistry) throws Throwable
invokeAsync
in interface CacheRpcCommand
Throwable
@Deprecated public GlobalTransaction getGlobalTransaction()
public byte getCommandId()
ReplicableCommand
getCommandId
in interface ReplicableCommand
public void writeTo(ObjectOutput output) throws IOException
ReplicableCommand
ObjectOutput
.writeTo
in interface ReplicableCommand
output
- the stream.IOException
- if an error occurred during the I/O.public void readFrom(ObjectInput input) throws IOException, ClassNotFoundException
ReplicableCommand
ReplicableCommand.writeTo(ObjectOutput)
.readFrom
in interface ReplicableCommand
input
- the stream to read.IOException
- if an error occurred during the I/O.ClassNotFoundException
- if it tries to load an undefined class.public String toString()
toString
in class BaseRpcCommand
public boolean isWrite()
public void setWrite(boolean write)
public int getSegment()
SegmentSpecificCommand
getSegment
in interface SegmentSpecificCommand
public Object getKey()
public boolean isReturnValueExpected()
ReplicableCommand
ResponseGenerator
may choose to simply return null to save on marshalling
costs.isReturnValueExpected
in interface ReplicableCommand
Copyright © 2021 JBoss by Red Hat. All rights reserved.