Class 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
  • Constructor Details

    • ClusteredGetCommand

      public ClusteredGetCommand(Object key, ByteString cacheName, Integer segment, long flags)
  • Method Details

    • getSegment

      public int getSegment()
      Description copied from interface: SegmentSpecificCommand
      Returns the segment that this key maps to. This must always return a number 0 or larger.
      Specified by:
      getSegment in interface SegmentSpecificCommand
      Returns:
      the segment of the key
    • invokeAsync

      public CompletionStage<?> invokeAsync(ComponentRegistry componentRegistry) throws Throwable
      Invokes a logical "get(key)" on a remote cache and returns results.
      Specified by:
      invokeAsync in interface CacheRpcCommand
      Returns:
      Throws:
      Throwable
    • supportedSince

      public NodeVersion supportedSince()
      Description copied from interface: ReplicableCommand
      Returns a NodeVersion representing 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 ReplicableCommand should always override this method.

      Specified by:
      supportedSince in interface ReplicableCommand
      Specified by:
      supportedSince in interface VersionAware
      Returns:
      a NodeVersion corresponding to the Infinispan version this command was added.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class BaseRpcCommand
    • isWrite

      public boolean isWrite()
    • setWrite

      public void setWrite(boolean write)
    • getKey

      public Object getKey()