@UnstableApi public final class RedisArrayAggregator extends MessageToMessageDecoder<RedisMessage>
RedisMessage parts into ArrayRedisMessage. This decoder
should be used together with RedisDecoder.ChannelHandler.Sharable| Constructor and Description |
|---|
RedisArrayAggregator()
Deprecated.
Use
RedisArrayAggregator(int, int) instead to define a max size of the array to aggregate. |
RedisArrayAggregator(int maxElements,
int maxNestedArrayDepth)
Create a new instance that will aggregate an
ArrayHeaderRedisMessage
and its subsequent elements into an ArrayRedisMessage. |
| Modifier and Type | Method and Description |
|---|---|
void |
channelInactive(ChannelHandlerContext ctx)
Calls
ChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline. |
protected void |
decode(ChannelHandlerContext ctx,
RedisMessage msg,
List<Object> out)
Decode from one message to an other.
|
void |
handlerRemoved(ChannelHandlerContext ctx)
Do nothing by default, sub-classes may override this method.
|
acceptInboundMessage, channelRead, channelReadCompletechannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerAdded@Deprecated public RedisArrayAggregator()
RedisArrayAggregator(int, int) instead to define a max size of the array to aggregate.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 system property.
public RedisArrayAggregator(int maxElements,
int maxNestedArrayDepth)
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.
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 thrownprotected void decode(ChannelHandlerContext ctx, RedisMessage msg, List<Object> out) throws Exception
MessageToMessageDecoderdecode in class MessageToMessageDecoder<RedisMessage>ctx - the ChannelHandlerContext which this MessageToMessageDecoder belongs tomsg - the message to decode to an other oneout - the List to which decoded messages should be addedException - is thrown if an error occurspublic void handlerRemoved(ChannelHandlerContext ctx) throws Exception
ChannelHandlerAdapterhandlerRemoved in interface ChannelHandlerhandlerRemoved in class ChannelHandlerAdapterExceptionpublic void channelInactive(ChannelHandlerContext ctx) throws Exception
ChannelInboundHandlerAdapterChannelHandlerContext.fireChannelInactive() to forward
to the next ChannelInboundHandler in the ChannelPipeline.
Sub-classes may override this method to change behavior.channelInactive in interface ChannelInboundHandlerchannelInactive in class ChannelInboundHandlerAdapterExceptionCopyright © 2008–2026 The Netty Project. All rights reserved.