Class ClusteredGetCommand
java.lang.Object
org.infinispan.commands.remote.BaseRpcCommand
org.infinispan.commands.remote.BaseClusteredReadCommand
org.infinispan.commands.remote.ClusteredGetCommand
- All Implemented Interfaces:
CacheRpcCommand, ReplicableCommand, SegmentSpecificCommand, TopologyAffectedCommand, TracedCommand, VersionAware
@ProtoTypeId(1059)
public class ClusteredGetCommand
extends BaseClusteredReadCommand
implements SegmentSpecificCommand
Issues a remote get call. This is not a
VisitableCommand and hence not passed up the
interceptor chain.- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com
-
Field Summary
Fields inherited from class BaseClusteredReadCommand
flags, topologyIdFields inherited from class BaseRpcCommand
cacheName, origin -
Constructor Summary
ConstructorsConstructorDescriptionClusteredGetCommand(Object key, ByteString cacheName, Integer segment, long flags) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetKey()intReturns the segment that this key maps to.inthashCode()invokeAsync(ComponentRegistry componentRegistry) Invokes a logical "get(key)" on a remote cache and returns results.booleanisWrite()voidsetWrite(boolean write) Returns aNodeVersionrepresenting the Infinispan version in which this command was added.toString()Methods inherited from class BaseClusteredReadCommand
getFlagsBitSet, getTopologyId, hasAnyFlag, isReturnValueExpected, printFlags, setFlagsBitSet, setTopologyIdMethods inherited from class BaseRpcCommand
getCacheName, getOrigin, setOriginMethods inherited from interface ReplicableCommand
getCommandId, isSuccessful, logThrowable, readFrom, writeToMethods inherited from interface TracedCommand
getOperationName, getSpanAttributes, setSpanAttributes
-
Constructor Details
-
ClusteredGetCommand
-
-
Method Details
-
getSegment
public int getSegment()Description copied from interface:SegmentSpecificCommandReturns the segment that this key maps to. This must always return a number 0 or larger.- Specified by:
getSegmentin interfaceSegmentSpecificCommand- Returns:
- the segment of the key
-
invokeAsync
Invokes a logical "get(key)" on a remote cache and returns results.- Specified by:
invokeAsyncin interfaceCacheRpcCommand- Returns:
- Throws:
Throwable
-
supportedSince
Description copied from interface:ReplicableCommandReturns aNodeVersionrepresenting the Infinispan version in which this command was added. This value is used to ensure that when the cluster contains different Infinispan versions, only commands compatible with the oldest version are transmitted.Abstract classes should not implement this method as the version should be specific to an individual implementation. Similarly, implementations which extend another
ReplicableCommandshould always override this method.- Specified by:
supportedSincein interfaceReplicableCommand- Specified by:
supportedSincein interfaceVersionAware- Returns:
- a
NodeVersioncorresponding to the Infinispan version this command was added.
-
equals
-
hashCode
-
toString
- Overrides:
toStringin classBaseRpcCommand
-
isWrite
public boolean isWrite() -
setWrite
public void setWrite(boolean write) -
getKey
-