Class RedisArrayAggregator

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    @UnstableApi
    public final class RedisArrayAggregator
    extends io.netty.handler.codec.MessageToMessageDecoder<RedisMessage>
    Aggregates RedisMessage parts into ArrayRedisMessage. This decoder should be used together with RedisDecoder.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      protected void decode​(io.netty.channel.ChannelHandlerContext ctx, RedisMessage msg, List<Object> out)  
      void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)  
      • Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder

        acceptInboundMessage, channelRead, channelReadComplete
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded
    • Constructor Detail

      • RedisArrayAggregator

        @Deprecated
        public RedisArrayAggregator()
        Deprecated.
        Use RedisArrayAggregator(int, int) instead to define a max size of the array to aggregate.
        Create a new instance that will aggregate an ArrayHeaderRedisMessage and its subsequent elements into an ArrayRedisMessage.

        This constructor specifies a maximum number of elements of 1.000.000, but this default can be increased with the "io.netty.handler.codec.redis.maxArrayLength" system property.

      • RedisArrayAggregator

        public RedisArrayAggregator​(int maxElements,
                                    int maxNestedArrayDepth)
        Create a new instance that will aggregate an ArrayHeaderRedisMessage and its subsequent elements into an ArrayRedisMessage.

        A CodecException will be thrown if the array header specify a length greater than the given number of max elements.

        Parameters:
        maxElements - The maximum number of elements to aggregate in a single message.
        maxNestedArrayDepth - the maximum depth of the nested array before an exception will be thrown
    • Method Detail

      • handlerRemoved

        public void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)
                            throws Exception
        Specified by:
        handlerRemoved in interface io.netty.channel.ChannelHandler
        Overrides:
        handlerRemoved in class io.netty.channel.ChannelHandlerAdapter
        Throws:
        Exception
      • channelInactive

        public void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)
                             throws Exception
        Specified by:
        channelInactive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception