@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, readensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharablepublic 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.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelOutboundHandlerAdapterExceptionpublic void newSuperstep(SuperstepMetricsRegistry superstepMetrics)
ResetSuperstepMetricsObservernewSuperstep in interface ResetSuperstepMetricsObserversuperstepMetrics - SuperstepMetricsRegistry being used.public void resetAll()
ByteCounterresetAll in interface ByteCounterpublic String getMetrics()
getMetrics in interface ByteCounterpublic String getMetricsWindow(int minMsecsWindow)
ByteCountergetMetricsWindow in interface ByteCounterminMsecsWindow - Msecs of the minimum windowCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.