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, channelRead
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
handlerAdded, handlerRemoved, isSharable
public 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>
Exception
Copyright © 2014 Red Hat, Inc.. All rights reserved.