public class MetricBatcher extends io.netty.handler.codec.MessageToMessageDecoder<SingleMetric>
SingleMetric objects in a batch of THRESHOLD
items to reduce backend communication overhead.
TODO how can we detect that Netty is going down and first send the last batch?| Constructor and Description |
|---|
MetricBatcher(String subKey) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
SingleMetric msg,
List<Object> out) |
acceptInboundMessage, channelReadchannelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredhandlerAdded, handlerRemoved, isSharablepublic MetricBatcher(String subKey)
protected void decode(io.netty.channel.ChannelHandlerContext ctx,
SingleMetric msg,
List<Object> out)
throws Exception
decode in class io.netty.handler.codec.MessageToMessageDecoder<SingleMetric>ExceptionCopyright © 2014 Red Hat, Inc.. All rights reserved.