Interface Codec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
allowOperationsAndEvents()
default <K,V>
org.infinispan.commons.util.CloseableIterator<Map.Entry<K,V>>entryIterator(RemoteCache<K,V> remoteCache, int batchSize)
Creates an entry iterator with the given batch size if applicable.int
estimateExpirationSize(long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
int
estimateHeaderSize(HeaderParams headerParams)
Log
getLog()
Logger for Hot Rod client codecdefault <K> org.infinispan.commons.util.CloseableIterator<K>
keyIterator(RemoteCache<K,?> remoteCache, OperationsFactory operationsFactory, int batchSize)
Creates a key iterator with the given batch size if applicable.AbstractClientEvent
readCacheEvent(io.netty.buffer.ByteBuf buf, Function<byte[],DataFormat> listenerDataFormat, short eventTypeId, org.infinispan.commons.configuration.ClassWhiteList whitelist, SocketAddress serverAddress)
HotRodCounterEvent
readCounterEvent(io.netty.buffer.ByteBuf buf)
Reads aHotRodCounterEvent
with thelistener-id
.short
readHeader(io.netty.buffer.ByteBuf buf, double receivedOpCode, HeaderParams params, ChannelFactory channelFactory, SocketAddress serverAddress)
Reads a response header from the transport and returns the status of the response.long
readMessageId(io.netty.buffer.ByteBuf buf)
default short
readMeta(io.netty.buffer.ByteBuf buf)
Iteration read to tell if metadata is present for entryshort
readOpCode(io.netty.buffer.ByteBuf buf)
default int
readProjectionSize(io.netty.buffer.ByteBuf buf)
Iteration read for projection size<T> T
readUnmarshallByteArray(io.netty.buffer.ByteBuf buf, short status, org.infinispan.commons.configuration.ClassWhiteList whitelist, org.infinispan.commons.marshall.Marshaller marshaller)
Read and unmarshall byte array.Object
returnPossiblePrevValue(io.netty.buffer.ByteBuf buf, short status, int flags, org.infinispan.commons.configuration.ClassWhiteList whitelist, org.infinispan.commons.marshall.Marshaller marshaller)
void
writeClientListenerInterests(io.netty.buffer.ByteBuf buf, Set<Class<? extends Annotation>> classes)
void
writeClientListenerParams(io.netty.buffer.ByteBuf buf, ClientListener clientListener, byte[][] filterFactoryParams, byte[][] converterFactoryParams)
Writes client listener parametersvoid
writeExpirationParams(io.netty.buffer.ByteBuf buf, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
Write lifespan/maxidle parameters.HeaderParams
writeHeader(io.netty.buffer.ByteBuf buf, HeaderParams params)
Writes a request header with the given parameters to the transport and returns an updated header parameters.default void
writeIteratorStartOperation(io.netty.buffer.ByteBuf buf, Set<Integer> segments, String filterConverterFactory, int batchSize, boolean metadata, byte[][] filterParameters)
-
-
-
Method Detail
-
estimateHeaderSize
int estimateHeaderSize(HeaderParams headerParams)
-
writeHeader
HeaderParams writeHeader(io.netty.buffer.ByteBuf buf, HeaderParams params)
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.
-
estimateExpirationSize
int estimateExpirationSize(long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit)
-
readMessageId
long readMessageId(io.netty.buffer.ByteBuf buf)
-
readOpCode
short readOpCode(io.netty.buffer.ByteBuf buf)
-
readHeader
short readHeader(io.netty.buffer.ByteBuf buf, double receivedOpCode, HeaderParams params, ChannelFactory channelFactory, SocketAddress serverAddress)
Reads a response header from the transport and returns the status of the response.
-
readCacheEvent
AbstractClientEvent readCacheEvent(io.netty.buffer.ByteBuf buf, Function<byte[],DataFormat> listenerDataFormat, short eventTypeId, org.infinispan.commons.configuration.ClassWhiteList whitelist, SocketAddress serverAddress)
-
returnPossiblePrevValue
Object returnPossiblePrevValue(io.netty.buffer.ByteBuf buf, short status, int flags, org.infinispan.commons.configuration.ClassWhiteList whitelist, org.infinispan.commons.marshall.Marshaller marshaller)
-
getLog
Log getLog()
Logger for Hot Rod client codec
-
readUnmarshallByteArray
<T> T readUnmarshallByteArray(io.netty.buffer.ByteBuf buf, short status, org.infinispan.commons.configuration.ClassWhiteList whitelist, org.infinispan.commons.marshall.Marshaller marshaller)
Read and unmarshall byte array.
-
writeClientListenerInterests
void writeClientListenerInterests(io.netty.buffer.ByteBuf buf, Set<Class<? extends Annotation>> classes)
-
readCounterEvent
HotRodCounterEvent readCounterEvent(io.netty.buffer.ByteBuf buf)
Reads aHotRodCounterEvent
with thelistener-id
.
-
allowOperationsAndEvents
default boolean allowOperationsAndEvents()
- Returns:
- True if we can send operations after registering a listener on given channel
-
readProjectionSize
default int readProjectionSize(io.netty.buffer.ByteBuf buf)
Iteration read for projection size- Parameters:
buf
-- Returns:
-
readMeta
default short readMeta(io.netty.buffer.ByteBuf buf)
Iteration read to tell if metadata is present for entry- Parameters:
buf
-- Returns:
-
writeIteratorStartOperation
default void writeIteratorStartOperation(io.netty.buffer.ByteBuf buf, Set<Integer> segments, String filterConverterFactory, int batchSize, boolean metadata, byte[][] filterParameters)
-
keyIterator
default <K> org.infinispan.commons.util.CloseableIterator<K> keyIterator(RemoteCache<K,?> remoteCache, OperationsFactory operationsFactory, int batchSize)
Creates a key iterator with the given batch size if applicable. This iterator does not support removal.- Type Parameters:
K
-- Parameters:
remoteCache
-batchSize
-- Returns:
-
entryIterator
default <K,V> org.infinispan.commons.util.CloseableIterator<Map.Entry<K,V>> entryIterator(RemoteCache<K,V> remoteCache, int batchSize)
Creates an entry iterator with the given batch size if applicable. This iterator does not support removal.- Type Parameters:
K
-V
-- Parameters:
remoteCache
-batchSize
-- Returns:
-
-