Package org.infinispan.server.resp
Class SubscriberHandler
java.lang.Object
org.infinispan.server.resp.RespRequestHandler
org.infinispan.server.resp.CacheRespRequestHandler
org.infinispan.server.resp.SubscriberHandler
-
Field Summary
FieldsFields inherited from class org.infinispan.server.resp.CacheRespRequestHandler
cache, respServerFields inherited from class org.infinispan.server.resp.RespRequestHandler
BYTE_BUF_POOL_ATTRIBUTE_KEY, myStage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletionStage<RespRequestHandler>actualHandleRequest(io.netty.channel.ChannelHandlerContext ctx, RespCommand type, List<byte[]> arguments) Handles the RESP request returning a stage that when complete notifies the command has completed as well as providing the request handler for subsequent commands.static byte[]channelToKey(byte[] channelBytes) voidhandleChannelDisconnect(io.netty.channel.ChannelHandlerContext ctx) static byte[]keyToChannel(byte[] keyBytes) Methods inherited from class org.infinispan.server.resp.CacheRespRequestHandler
setCacheMethods inherited from class org.infinispan.server.resp.RespRequestHandler
bytesToResult, handleRequest, initializeIfNecessary, setIntChars, stageToReturn, stageToReturn, stringSize, stringToByteBuf, stringToByteBufWithExtra
-
Field Details
-
PREFIX_CHANNEL_BYTES
public static final byte[] PREFIX_CHANNEL_BYTES
-
-
Constructor Details
-
SubscriberHandler
-
-
Method Details
-
keyToChannel
public static byte[] keyToChannel(byte[] keyBytes) -
channelToKey
public static byte[] channelToKey(byte[] channelBytes) -
handleChannelDisconnect
public void handleChannelDisconnect(io.netty.channel.ChannelHandlerContext ctx) - Overrides:
handleChannelDisconnectin classRespRequestHandler
-
actualHandleRequest
protected CompletionStage<RespRequestHandler> actualHandleRequest(io.netty.channel.ChannelHandlerContext ctx, RespCommand type, List<byte[]> arguments) Description copied from class:RespRequestHandlerHandles the RESP request returning a stage that when complete notifies the command has completed as well as providing the request handler for subsequent commands.Implementations should never use the ByteBufAllocator in the context. Instead, they should use
RespRequestHandler.allocatorToUseto retrieve a ByteBuffer. This ByteBuffer should only have bytes written to it adding up to the size requested. The ByteBuffer itself should never be written to the context or channel and flush should also never be invoked. Failure to do so may cause mis-ordering or responses as requests support pipelining and a ByteBuf may not be send down stream until later in the pipeline.- Overrides:
actualHandleRequestin classRespRequestHandler- Parameters:
ctx- Netty context pipeline for this requesttype- The command typearguments- The remaining arguments to the command- Returns:
- stage that when complete returns the new handler to instate. This stage must be completed on the event loop
-