Class AbstractKeyOperation<K,T>

All Implemented Interfaces:
Runnable, CompletionStage<T>, Future<T>, HotRodConstants, ChannelOperation
Direct Known Subclasses:
AbstractKeyValueOperation, AbstractMultimapKeyOperation, AbstractRemoveOperation, ContainsKeyOperation, GetOperation, GetStreamOperation, GetWithMetadataOperation, PutStreamOperation, RemoveIfUnmodifiedOperation

public abstract class AbstractKeyOperation<K,T> extends StatsAffectingRetryingOperation<T>
Basic class for all hot rod operations that manipulate a key.
Since:
14.0
  • Field Details

    • key

      protected final K key
    • keyBytes

      protected final byte[] keyBytes
  • Constructor Details

    • AbstractKeyOperation

      protected AbstractKeyOperation(OperationContext operationContext, short requestCode, short responseCode, K key, byte[] keyBytes, org.infinispan.api.common.CacheOptions options, DataFormat dataFormat)
  • Method Details

    • fetchChannelAndInvoke

      protected void fetchChannelAndInvoke(int retryCount, Set<SocketAddress> failedServers)
      Overrides:
      fetchChannelAndInvoke in class RetryOnFailureOperation<T>
    • returnPossiblePrevValue

      protected <V> org.infinispan.api.common.CacheEntry<K,V> returnPossiblePrevValue(io.netty.buffer.ByteBuf buf, short status)
    • operationKey

      public K operationKey()
    • returnVersionedOperationResponse

      protected <V> VersionedOperationResponse<org.infinispan.api.common.CacheEntry<K,V>> returnVersionedOperationResponse(io.netty.buffer.ByteBuf buf, short status)
    • addParams

      protected void addParams(StringBuilder sb)
      Overrides:
      addParams in class HotRodOperation<T>
    • readEntry

      public static <K, V> org.infinispan.api.common.CacheEntry<K,V> readEntry(io.netty.buffer.ByteBuf buf, K key, DataFormat dataFormat, org.infinispan.commons.configuration.ClassAllowList allowList)