Class SubscriberHandler
java.lang.Object
org.infinispan.server.resp.RespRequestHandler
org.infinispan.server.resp.CacheRespRequestHandler
org.infinispan.server.resp.Resp3AuthHandler
org.infinispan.server.resp.Resp3Handler
org.infinispan.server.resp.SubscriberHandler
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class Resp3Handler
blockingManager, embeddedSetCache, ignorePreviousValueCache, jsonCache, listMultimap, mapMultimap, scheduler, sortedSetMultimapFields inherited from class RespRequestHandler
BYTE_BUF_POOL_ATTRIBUTE_KEY, myStage, respServer, writer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletionStage<RespRequestHandler> actualHandleRequest(io.netty.channel.ChannelHandlerContext ctx, RespCommand command, 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.protected voidvoiddiscardSubscriptions(io.netty.channel.ChannelHandlerContext ctx) voidhandleChannelDisconnect(io.netty.channel.ChannelHandlerContext ctx) handleStageListenerError(CompletionStage<Void> stage, byte[] keyChannel, boolean subscribeOrUnsubscribe) static RespCacheListenernewKeyListener(io.netty.channel.Channel channel, byte[] key) static RespCacheListenernewPatternListener(io.netty.channel.Channel channel, byte[] pattern) punsubscribeAll(io.netty.channel.ChannelHandlerContext ctx) voidsendSubscriptions(io.netty.channel.ChannelHandlerContext ctx, CompletionStage<Void> stageToWaitFor, Collection<byte[]> keyChannels, boolean isSubscribe) sendSubscriptions(io.netty.channel.ChannelHandlerContext ctx, CompletionStage<Void> stageToWaitFor, Collection<byte[]> keyChannels, boolean isSubscribe, boolean isPattern) unsubscribeAll(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class Resp3Handler
checkPermission, delegate, getBlockingManager, getEmbeddedSetCache, getHashMapMultimap, getJsonCache, getListMultimap, getScheduler, getSortedSeMultimap, ignorePreviousValuesCache, setCacheMethods inherited from class Resp3AuthHandler
canUseCertAuth, isAuthorized, performAuth, performAuthMethods inherited from class CacheRespRequestHandler
cache, typedCacheMethods inherited from class RespRequestHandler
handleRequest, initializeIfNecessary, myStage, respServer, stageToReturn, stageToReturn, stageToReturn, writer, writer
-
Constructor Details
-
SubscriberHandler
-
-
Method Details
-
newKeyListener
-
newPatternListener
public static RespCacheListener newPatternListener(io.netty.channel.Channel channel, byte[] pattern) -
specificChannelSubscribers
-
patternSubscribers
-
resp3Handler
-
handleChannelDisconnect
public void handleChannelDisconnect(io.netty.channel.ChannelHandlerContext ctx) - Overrides:
handleChannelDisconnectin classRespRequestHandler
-
commandNotFound
protected void commandNotFound()- Overrides:
commandNotFoundin classRespRequestHandler
-
actualHandleRequest
protected CompletionStage<RespRequestHandler> actualHandleRequest(io.netty.channel.ChannelHandlerContext ctx, RespCommand command, 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.writerto retrieve aResponseWriterThis 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 sent down stream until later in the pipeline.- Overrides:
actualHandleRequestin classResp3Handler- Parameters:
ctx- Netty context pipeline for this requestcommand- 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
-
handleStageListenerError
public CompletionStage<Void> handleStageListenerError(CompletionStage<Void> stage, byte[] keyChannel, boolean subscribeOrUnsubscribe) -
removeAllListeners
public void removeAllListeners() -
discardSubscriptions
public void discardSubscriptions(io.netty.channel.ChannelHandlerContext ctx) -
unsubscribeAll
public CompletionStage<RespRequestHandler> unsubscribeAll(io.netty.channel.ChannelHandlerContext ctx) -
punsubscribeAll
public CompletionStage<RespRequestHandler> punsubscribeAll(io.netty.channel.ChannelHandlerContext ctx) -
sendSubscriptions
public CompletionStage<RespRequestHandler> sendSubscriptions(io.netty.channel.ChannelHandlerContext ctx, CompletionStage<Void> stageToWaitFor, Collection<byte[]> keyChannels, boolean isSubscribe) -
sendSubscriptions
public CompletionStage<RespRequestHandler> sendSubscriptions(io.netty.channel.ChannelHandlerContext ctx, CompletionStage<Void> stageToWaitFor, Collection<byte[]> keyChannels, boolean isSubscribe, boolean isPattern)
-