public class GlobalChannelTrafficCounter extends TrafficCounter
GlobalChannelTrafficShapingHandler
.
This TrafficCounter is the Global one, and its special property is to directly handle
other channel's TrafficCounters. In particular, there are no scheduler for those
channel's TrafficCounters because it is managed by this one.Constructor and Description |
---|
GlobalChannelTrafficCounter(GlobalChannelTrafficShapingHandler trafficShapingHandler,
Timer timer,
String name,
long checkInterval) |
Modifier and Type | Method and Description |
---|---|
void |
resetCumulativeTime()
Reset both read and written cumulative bytes counters and the associated absolute time
from System.currentTimeMillis().
|
void |
start()
Start the monitoring process.
|
void |
stop()
Stop the monitoring process.
|
configure, getCheckInterval, getCumulativeReadBytes, getCumulativeWrittenBytes, getCurrentReadBytes, getCurrentWrittenBytes, getLastCumulativeTime, getLastReadBytes, getLastReadThroughput, getLastTime, getLastWriteThroughput, getLastWrittenBytes, getName, getRealWriteThroughput, getRealWrittenBytes, milliSecondFromNano, readTimeToWait, readTimeToWait, toString, writeTimeToWait, writeTimeToWait
public GlobalChannelTrafficCounter(GlobalChannelTrafficShapingHandler trafficShapingHandler, Timer timer, String name, long checkInterval)
trafficShapingHandler
- the associated GlobalChannelTrafficShapingHandler
.name
- the name given to this monitorcheckInterval
- the checkInterval in millisecond between two computations.public void start()
start
in class TrafficCounter
public void stop()
stop
in class TrafficCounter
public void resetCumulativeTime()
TrafficCounter
resetCumulativeTime
in class TrafficCounter
Copyright © 2008-2016 The Netty Project. All Rights Reserved.