Class Codec40

    • Constructor Detail

      • Codec40

        public Codec40()
    • Method Detail

      • 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
      • writeDataTypes

        protected void writeDataTypes​(io.netty.buffer.ByteBuf buf,
                                      DataFormat dataFormat)
      • writeClientListenerInterests

        public void writeClientListenerInterests​(io.netty.buffer.ByteBuf buf,
                                                 EnumSet<org.infinispan.api.common.events.cache.CacheEntryEventType> types)
        Specified by:
        writeClientListenerInterests 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,
                                          org.infinispan.api.common.CacheEntryExpiration.Impl expiration)
        Description copied from interface: Codec
        Write lifespan/maxidle parameters.
        Specified by:
        writeExpirationParams in interface Codec
      • writeBloomFilter

        public void writeBloomFilter​(io.netty.buffer.ByteBuf buf,
                                     int bloomFilterBits)
        Specified by:
        writeBloomFilter in interface Codec
      • estimateExpirationSize

        public int estimateExpirationSize​(org.infinispan.api.common.CacheEntryExpiration.Impl expiration)
        Specified by:
        estimateExpirationSize 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,
                                                                                CacheOperationsFactory cacheOperationsFactory,
                                                                                org.infinispan.api.common.CacheOptions options,
                                                                                org.infinispan.commons.util.IntSet segments,
                                                                                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:
      • entryIterator

        public <K,​V> org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<K,​V>> entryIterator​(RemoteCache<K,​V> remoteCache,
                                                                                                                                        org.infinispan.commons.util.IntSet segments,
                                                                                                                                        int batchSize)
        Description copied from interface: Codec
        Creates an entry iterator with the given batch size if applicable. This iterator does not support removal.
        Specified by:
        entryIterator in interface Codec
        Returns:
      • castEntryIterator

        protected <K,​V> org.infinispan.commons.util.CloseableIterator<org.infinispan.api.common.CacheEntry<K,​V>> castEntryIterator​(org.infinispan.commons.util.CloseableIterator iterator)
      • isObjectStorageHinted

        public boolean isObjectStorageHinted​(PingResponse pingResponse)
        Description copied from interface: Codec
        Read the response code for hints of object storage in the server.
        Specified by:
        isObjectStorageHinted in interface Codec
      • returnPossiblePrevValue

        public <K,​V> org.infinispan.api.common.CacheEntry<K,​V> returnPossiblePrevValue​(K key,
                                                                                                   io.netty.buffer.ByteBuf buf,
                                                                                                   short status,
                                                                                                   DataFormat dataFormat,
                                                                                                   int flags,
                                                                                                   org.infinispan.commons.configuration.ClassAllowList allowList,
                                                                                                   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)
      • 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)
      • writeIteratorStartOperation

        public void writeIteratorStartOperation​(io.netty.buffer.ByteBuf buf,
                                                org.infinispan.commons.util.IntSet segments,
                                                String filterConverterFactory,
                                                int batchSize,
                                                boolean metadata,
                                                byte[][] filterParameters)
        Specified by:
        writeIteratorStartOperation in interface Codec
      • readProjectionSize

        public int readProjectionSize​(io.netty.buffer.ByteBuf buf)
        Description copied from interface: Codec
        Iteration read for projection size
        Specified by:
        readProjectionSize in interface Codec
        Returns:
      • readMeta

        public short readMeta​(io.netty.buffer.ByteBuf buf)
        Description copied from interface: Codec
        Iteration read to tell if metadata is present for entry
        Specified by:
        readMeta in interface Codec
        Returns:
      • allowOperationsAndEvents

        public boolean allowOperationsAndEvents()
        Specified by:
        allowOperationsAndEvents in interface Codec
        Returns:
        True if we can send operations after registering a listener on given channel
      • readKeyType

        public org.infinispan.commons.dataconversion.MediaType readKeyType​(io.netty.buffer.ByteBuf buf)
        Description copied from interface: Codec
        Reads the MediaType of the key during initial ping of the cache.
        Specified by:
        readKeyType in interface Codec
      • readValueType

        public org.infinispan.commons.dataconversion.MediaType readValueType​(io.netty.buffer.ByteBuf buf)
        Description copied from interface: Codec
        Reads the MediaType of the key during initial ping of the cache.
        Specified by:
        readValueType in interface Codec
      • estimateSizeMultimapSupportsDuplicated

        public int estimateSizeMultimapSupportsDuplicated()
        Specified by:
        estimateSizeMultimapSupportsDuplicated in interface Codec
        Returns:
        size that needs to be allocated in buffer for supportsDuplicates information.
      • writeMultimapSupportDuplicates

        public void writeMultimapSupportDuplicates​(io.netty.buffer.ByteBuf buf,
                                                   boolean supportsDuplicates)
        Specified by:
        writeMultimapSupportDuplicates in interface Codec
        Parameters:
        buf - , buffer which supportsDuplicates info will be written to.
        supportsDuplicates - , to see whether multimap cache supports duplicates or not.