@ChannelHandler.Sharable public class OutboundByteCounter extends io.netty.channel.ChannelOutboundHandlerAdapter implements ByteCounter, ResetSuperstepMetricsObserver
Constructor and Description |
---|
OutboundByteCounter()
Constructor
|
Modifier and Type | Method and Description |
---|---|
long |
getBytesSent() |
double |
getMbytesPerSecSent() |
String |
getMetrics() |
String |
getMetricsWindow(int minMsecsWindow)
Get the metrics if a given window of time has passed.
|
void |
newSuperstep(SuperstepMetricsRegistry superstepMetrics)
Starting a new superstep.
|
void |
resetAll()
Reset everything this object keeps track of
|
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, read
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
public long getBytesSent()
public double getMbytesPerSecSent()
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
write
in interface io.netty.channel.ChannelOutboundHandler
write
in class io.netty.channel.ChannelOutboundHandlerAdapter
Exception
public void newSuperstep(SuperstepMetricsRegistry superstepMetrics)
ResetSuperstepMetricsObserver
newSuperstep
in interface ResetSuperstepMetricsObserver
superstepMetrics
- SuperstepMetricsRegistry being used.public void resetAll()
ByteCounter
resetAll
in interface ByteCounter
public String getMetrics()
getMetrics
in interface ByteCounter
public String getMetricsWindow(int minMsecsWindow)
ByteCounter
getMetricsWindow
in interface ByteCounter
minMsecsWindow
- Msecs of the minimum windowCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.