Package org.infinispan.server.hotrod
Class AbstractEncoder1x
- java.lang.Object
-
- org.infinispan.server.hotrod.AbstractEncoder1x
-
- All Implemented Interfaces:
VersionedEncoder
- Direct Known Subclasses:
AbstractTopologyAwareEncoder1x
public abstract class AbstractEncoder1x extends Object implements VersionedEncoder
Hot Rod encoder for protocol version 1.1- Since:
- 5.1
- Author:
- Galder ZamarreƱo
-
-
Constructor Summary
Constructors Constructor Description AbstractEncoder1x()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.buffer.ByteBuf
authMechListResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Set<String> mechs)
io.netty.buffer.ByteBuf
authResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] challenge)
io.netty.buffer.ByteBuf
booleanResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, boolean result)
io.netty.buffer.ByteBuf
bulkGetKeysResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, CloseableIterator<byte[]> iterator)
io.netty.buffer.ByteBuf
bulkGetResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, int size, CacheSet<Map.Entry<byte[],byte[]>> entries)
io.netty.buffer.ByteBuf
counterConfigurationResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, CounterConfiguration configuration)
io.netty.buffer.ByteBuf
counterNamesResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Collection<String> counterNames)
protected org.infinispan.server.hotrod.AbstractHashDistAwareResponse
createHashDistAwareResp(int topologyId, Map<Address,ServerAddress> serverEndpointsMap, Configuration cfg)
io.netty.buffer.ByteBuf
emptyResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status)
io.netty.buffer.ByteBuf
errorResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, String message, OperationStatus status)
OperationStatus
errorStatus(Throwable t)
io.netty.buffer.ByteBuf
getAllResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Map<byte[],byte[]> map)
io.netty.buffer.ByteBuf
getStreamResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, int offset, CacheEntry<byte[],byte[]> entry)
io.netty.buffer.ByteBuf
getWithMetadataResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, CacheEntry<byte[],byte[]> entry)
io.netty.buffer.ByteBuf
iterationNextResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, IterableIterationResult iterationResult)
io.netty.buffer.ByteBuf
iterationStartResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, String iterationId)
io.netty.buffer.ByteBuf
longResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, long value)
io.netty.buffer.ByteBuf
multimapCollectionResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status, Collection<byte[]> values)
io.netty.buffer.ByteBuf
multimapEntryResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status, CacheEntry<WrappedByteArray,Collection<WrappedByteArray>> ce, Collection<byte[]> result)
io.netty.buffer.ByteBuf
notExecutedResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] prev)
io.netty.buffer.ByteBuf
notExistResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc)
io.netty.buffer.ByteBuf
recoveryResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Collection<Xid> xids)
io.netty.buffer.ByteBuf
statsResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Stats stats, NettyTransport transport, ComponentRegistry cacheRegistry)
io.netty.buffer.ByteBuf
successResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] result)
io.netty.buffer.ByteBuf
transactionResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, int xaReturnCode)
io.netty.buffer.ByteBuf
unsignedLongResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, long value)
io.netty.buffer.ByteBuf
valueResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status, byte[] prev)
io.netty.buffer.ByteBuf
valueWithVersionResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] value, long version)
void
writeCounterEvent(ClientCounterEvent event, io.netty.buffer.ByteBuf buffer)
Writes aClientCounterEvent
, including its header, using a giver channel buffer.void
writeEvent(org.infinispan.server.hotrod.Events.Event e, io.netty.buffer.ByteBuf buf)
Write an event, including its header, using the given channel buffer-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.server.hotrod.VersionedEncoder
emptyResponseWithMediaTypes
-
-
-
-
Method Detail
-
writeEvent
public void writeEvent(org.infinispan.server.hotrod.Events.Event e, io.netty.buffer.ByteBuf buf)
Description copied from interface:VersionedEncoder
Write an event, including its header, using the given channel buffer- Specified by:
writeEvent
in interfaceVersionedEncoder
-
writeCounterEvent
public void writeCounterEvent(ClientCounterEvent event, io.netty.buffer.ByteBuf buffer)
Description copied from interface:VersionedEncoder
Writes aClientCounterEvent
, including its header, using a giver channel buffer.- Specified by:
writeCounterEvent
in interfaceVersionedEncoder
-
authResponse
public io.netty.buffer.ByteBuf authResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] challenge)
- Specified by:
authResponse
in interfaceVersionedEncoder
-
authMechListResponse
public io.netty.buffer.ByteBuf authMechListResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Set<String> mechs)
- Specified by:
authMechListResponse
in interfaceVersionedEncoder
-
notExecutedResponse
public io.netty.buffer.ByteBuf notExecutedResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] prev)
- Specified by:
notExecutedResponse
in interfaceVersionedEncoder
-
notExistResponse
public io.netty.buffer.ByteBuf notExistResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc)
- Specified by:
notExistResponse
in interfaceVersionedEncoder
-
valueResponse
public io.netty.buffer.ByteBuf valueResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status, byte[] prev)
- Specified by:
valueResponse
in interfaceVersionedEncoder
-
successResponse
public io.netty.buffer.ByteBuf successResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] result)
- Specified by:
successResponse
in interfaceVersionedEncoder
-
transactionResponse
public io.netty.buffer.ByteBuf transactionResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, int xaReturnCode)
- Specified by:
transactionResponse
in interfaceVersionedEncoder
-
recoveryResponse
public io.netty.buffer.ByteBuf recoveryResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Collection<Xid> xids)
- Specified by:
recoveryResponse
in interfaceVersionedEncoder
-
errorResponse
public io.netty.buffer.ByteBuf errorResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, String message, OperationStatus status)
- Specified by:
errorResponse
in interfaceVersionedEncoder
-
bulkGetResponse
public io.netty.buffer.ByteBuf bulkGetResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, int size, CacheSet<Map.Entry<byte[],byte[]>> entries)
- Specified by:
bulkGetResponse
in interfaceVersionedEncoder
-
emptyResponse
public io.netty.buffer.ByteBuf emptyResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status)
- Specified by:
emptyResponse
in interfaceVersionedEncoder
-
statsResponse
public io.netty.buffer.ByteBuf statsResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Stats stats, NettyTransport transport, ComponentRegistry cacheRegistry)
- Specified by:
statsResponse
in interfaceVersionedEncoder
-
getWithMetadataResponse
public io.netty.buffer.ByteBuf getWithMetadataResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, CacheEntry<byte[],byte[]> entry)
- Specified by:
getWithMetadataResponse
in interfaceVersionedEncoder
-
getStreamResponse
public io.netty.buffer.ByteBuf getStreamResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, int offset, CacheEntry<byte[],byte[]> entry)
- Specified by:
getStreamResponse
in interfaceVersionedEncoder
-
getAllResponse
public io.netty.buffer.ByteBuf getAllResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Map<byte[],byte[]> map)
- Specified by:
getAllResponse
in interfaceVersionedEncoder
-
bulkGetKeysResponse
public io.netty.buffer.ByteBuf bulkGetKeysResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, CloseableIterator<byte[]> iterator)
- Specified by:
bulkGetKeysResponse
in interfaceVersionedEncoder
-
iterationStartResponse
public io.netty.buffer.ByteBuf iterationStartResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, String iterationId)
- Specified by:
iterationStartResponse
in interfaceVersionedEncoder
-
iterationNextResponse
public io.netty.buffer.ByteBuf iterationNextResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, IterableIterationResult iterationResult)
- Specified by:
iterationNextResponse
in interfaceVersionedEncoder
-
counterConfigurationResponse
public io.netty.buffer.ByteBuf counterConfigurationResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, CounterConfiguration configuration)
- Specified by:
counterConfigurationResponse
in interfaceVersionedEncoder
-
counterNamesResponse
public io.netty.buffer.ByteBuf counterNamesResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, Collection<String> counterNames)
- Specified by:
counterNamesResponse
in interfaceVersionedEncoder
-
multimapCollectionResponse
public io.netty.buffer.ByteBuf multimapCollectionResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status, Collection<byte[]> values)
- Specified by:
multimapCollectionResponse
in interfaceVersionedEncoder
-
multimapEntryResponse
public io.netty.buffer.ByteBuf multimapEntryResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, OperationStatus status, CacheEntry<WrappedByteArray,Collection<WrappedByteArray>> ce, Collection<byte[]> result)
- Specified by:
multimapEntryResponse
in interfaceVersionedEncoder
-
booleanResponse
public io.netty.buffer.ByteBuf booleanResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, boolean result)
- Specified by:
booleanResponse
in interfaceVersionedEncoder
-
unsignedLongResponse
public io.netty.buffer.ByteBuf unsignedLongResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, long value)
- Specified by:
unsignedLongResponse
in interfaceVersionedEncoder
-
valueWithVersionResponse
public io.netty.buffer.ByteBuf valueWithVersionResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, byte[] value, long version)
- Specified by:
valueWithVersionResponse
in interfaceVersionedEncoder
-
longResponse
public io.netty.buffer.ByteBuf longResponse(HotRodHeader header, HotRodServer server, io.netty.buffer.ByteBufAllocator alloc, long value)
- Specified by:
longResponse
in interfaceVersionedEncoder
-
errorStatus
public OperationStatus errorStatus(Throwable t)
- Specified by:
errorStatus
in interfaceVersionedEncoder
-
createHashDistAwareResp
protected org.infinispan.server.hotrod.AbstractHashDistAwareResponse createHashDistAwareResp(int topologyId, Map<Address,ServerAddress> serverEndpointsMap, Configuration cfg)
-
-