All Known Implementing Classes:
Codec30, Codec31, Codec40, Codec41

public interface Codec
A Hot Rod protocol encoder/decoder.
Since:
5.1
Author:
Galder ZamarreƱo
  • Method Details

    • writeHeader

      void writeHeader(io.netty.buffer.ByteBuf buf, long messageId, ClientTopology clientTopology, HotRodOperation<?> operation)
      Writes a request header with the given parameters to the transport and returns an updated header parameters.
    • writeClientListenerParams

      void writeClientListenerParams(io.netty.buffer.ByteBuf buf, ClientListener clientListener, byte[][] filterFactoryParams, byte[][] converterFactoryParams)
      Writes client listener parameters
    • writeExpirationParams

      void writeExpirationParams(io.netty.buffer.ByteBuf buf, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
      Write lifespan/maxidle parameters.
    • writeBloomFilter

      void writeBloomFilter(io.netty.buffer.ByteBuf buf, int bloomFilterBits)
    • estimateExpirationSize

      int estimateExpirationSize(long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
    • readMessageId

      long readMessageId(io.netty.buffer.ByteBuf buf)
    • checkForErrorsInResponseStatus

      void checkForErrorsInResponseStatus(io.netty.buffer.ByteBuf buf, String cacheName, long messageId, short status, SocketAddress serverAddress)
    • readCacheEvent

      AbstractClientEvent readCacheEvent(io.netty.buffer.ByteBuf buf, long messageId, Function<byte[],DataFormat> listenerDataFormat, short eventTypeId, org.infinispan.commons.configuration.ClassAllowList allowList, SocketAddress serverAddress)
    • returnPossiblePrevValue

      Object returnPossiblePrevValue(io.netty.buffer.ByteBuf buf, short status, CacheUnmarshaller unmarshaller)
    • returnMetadataValue

      <V> MetadataValue<V> returnMetadataValue(io.netty.buffer.ByteBuf buf, short status, CacheUnmarshaller unmarshaller)
    • writeClientListenerInterests

      void writeClientListenerInterests(io.netty.buffer.ByteBuf buf, Set<Class<? extends Annotation>> classes)
    • readCounterEvent

      HotRodCounterEvent readCounterEvent(io.netty.buffer.ByteBuf buf)
      Reads a HotRodCounterEvent with the listener-id.
    • writeIteratorStartOperation

      default void writeIteratorStartOperation(io.netty.buffer.ByteBuf buf, org.infinispan.commons.util.IntSet segments, String filterConverterFactory, int batchSize, boolean metadata, byte[][] filterParameters)
    • writeMultimapSupportDuplicates

      void writeMultimapSupportDuplicates(io.netty.buffer.ByteBuf buf, boolean supportsDuplicates)
      Parameters:
      buf - , buffer which supportsDuplicates info will be written to.
      supportsDuplicates - , to see whether multimap cache supports duplicates or not.
    • isUnsafeForTheHandshake

      default boolean isUnsafeForTheHandshake()
      Returns true if the current codec uses a latest codec version, that could be unsafe for the initial handshake. This is necessary to check interoperability between versions during the protocol negotiation.