Interface Codec
public interface Codec
A Hot Rod protocol encoder/decoder.
- Since:
- 5.1
- Author:
- Galder ZamarreƱo
-
Method Summary
Modifier and TypeMethodDescriptionvoidcheckForErrorsInResponseStatus(io.netty.buffer.ByteBuf buf, String cacheName, long messageId, short status, SocketAddress serverAddress) intestimateExpirationSize(long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) default booleanReturns true if the current codec uses a latest codec version, that could be unsafe for the initial handshake.readCacheEvent(io.netty.buffer.ByteBuf buf, long messageId, Function<byte[], DataFormat> listenerDataFormat, short eventTypeId, org.infinispan.commons.configuration.ClassAllowList allowList, SocketAddress serverAddress) readCounterEvent(io.netty.buffer.ByteBuf buf) Reads aHotRodCounterEventwith thelistener-id.longreadMessageId(io.netty.buffer.ByteBuf buf) <V> MetadataValue<V> returnMetadataValue(io.netty.buffer.ByteBuf buf, short status, CacheUnmarshaller unmarshaller) returnPossiblePrevValue(io.netty.buffer.ByteBuf buf, short status, CacheUnmarshaller unmarshaller) voidwriteBloomFilter(io.netty.buffer.ByteBuf buf, int bloomFilterBits) voidwriteClientListenerInterests(io.netty.buffer.ByteBuf buf, Set<Class<? extends Annotation>> classes) voidwriteClientListenerParams(io.netty.buffer.ByteBuf buf, ClientListener clientListener, byte[][] filterFactoryParams, byte[][] converterFactoryParams) Writes client listener parametersvoidwriteExpirationParams(io.netty.buffer.ByteBuf buf, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) Write lifespan/maxidle parameters.voidwriteHeader(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.default voidwriteIteratorStartOperation(io.netty.buffer.ByteBuf buf, org.infinispan.commons.util.IntSet segments, String filterConverterFactory, int batchSize, boolean metadata, byte[][] filterParameters) voidwriteMultimapSupportDuplicates(io.netty.buffer.ByteBuf buf, boolean supportsDuplicates)
-
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
-
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
Reads aHotRodCounterEventwith thelistener-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.
-