Class Codec20

    • Constructor Detail

      • Codec20

        public Codec20()
    • Method Detail

      • readUnmarshallByteArray

        public <T> T readUnmarshallByteArray​(io.netty.buffer.ByteBuf buf,
                                             short status,
                                             org.infinispan.commons.configuration.ClassWhiteList whitelist,
                                             org.infinispan.commons.marshall.Marshaller marshaller)
        Description copied from interface: Codec
        Read and unmarshall byte array.
        Specified by:
        readUnmarshallByteArray in interface Codec
      • writeHeader

        public HeaderParams writeHeader​(io.netty.buffer.ByteBuf buf,
                                        HeaderParams params)
        Description copied from interface: Codec
        Writes a request header with the given parameters to the transport and returns an updated header parameters.
        Specified by:
        writeHeader in interface Codec
      • writeClientListenerParams

        public void writeClientListenerParams​(io.netty.buffer.ByteBuf buf,
                                              ClientListener clientListener,
                                              byte[][] filterFactoryParams,
                                              byte[][] converterFactoryParams)
        Description copied from interface: Codec
        Writes client listener parameters
        Specified by:
        writeClientListenerParams in interface Codec
      • writeExpirationParams

        public void writeExpirationParams​(io.netty.buffer.ByteBuf buf,
                                          long lifespan,
                                          TimeUnit lifespanTimeUnit,
                                          long maxIdle,
                                          TimeUnit maxIdleTimeUnit)
        Description copied from interface: Codec
        Write lifespan/maxidle parameters.
        Specified by:
        writeExpirationParams in interface Codec
      • writeHeader

        protected HeaderParams writeHeader​(io.netty.buffer.ByteBuf buf,
                                           HeaderParams params,
                                           byte version)
      • readMessageId

        public long readMessageId​(io.netty.buffer.ByteBuf buf)
        Specified by:
        readMessageId in interface Codec
      • readOpCode

        public short readOpCode​(io.netty.buffer.ByteBuf buf)
        Specified by:
        readOpCode in interface Codec
      • readHeader

        public short readHeader​(io.netty.buffer.ByteBuf buf,
                                double receivedOpCode,
                                HeaderParams params,
                                ChannelFactory channelFactory,
                                SocketAddress serverAddress)
        Description copied from interface: Codec
        Reads a response header from the transport and returns the status of the response.
        Specified by:
        readHeader in interface Codec
      • keyIterator

        public <K> org.infinispan.commons.util.CloseableIterator<K> keyIterator​(RemoteCache<K,​?> remoteCache,
                                                                                OperationsFactory operationsFactory,
                                                                                int batchSize)
        Description copied from interface: Codec
        Creates a key iterator with the given batch size if applicable. This iterator does not support removal.
        Specified by:
        keyIterator in interface Codec
        Returns:
      • returnPossiblePrevValue

        public Object returnPossiblePrevValue​(io.netty.buffer.ByteBuf buf,
                                              short status,
                                              int flags,
                                              org.infinispan.commons.configuration.ClassWhiteList whitelist,
                                              org.infinispan.commons.marshall.Marshaller marshaller)
        Specified by:
        returnPossiblePrevValue in interface Codec
      • createRemovedEvent

        protected AbstractClientEvent createRemovedEvent​(byte[] listenerId,
                                                         Object key,
                                                         boolean isRetried)
      • createModifiedEvent

        protected AbstractClientEvent createModifiedEvent​(byte[] listenerId,
                                                          Object key,
                                                          long dataVersion,
                                                          boolean isRetried)
      • createCreatedEvent

        protected AbstractClientEvent createCreatedEvent​(byte[] listenerId,
                                                         Object key,
                                                         long dataVersion,
                                                         boolean isRetried)
      • getLog

        public Log getLog()
        Description copied from interface: Codec
        Logger for Hot Rod client codec
        Specified by:
        getLog in interface Codec
      • checkForErrorsInResponseStatus

        protected void checkForErrorsInResponseStatus​(io.netty.buffer.ByteBuf buf,
                                                      HeaderParams params,
                                                      short status,
                                                      SocketAddress serverAddress)
      • readNewTopologyIfPresent

        protected void readNewTopologyIfPresent​(io.netty.buffer.ByteBuf buf,
                                                HeaderParams params,
                                                ChannelFactory channelFactory)
      • readNewTopologyAndHash

        protected void readNewTopologyAndHash​(io.netty.buffer.ByteBuf buf,
                                              HeaderParams params,
                                              ChannelFactory channelFactory)