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.构造器和说明 |
---|
GlobalChannelTrafficCounter(GlobalChannelTrafficShapingHandler trafficShapingHandler,
Timer timer,
java.lang.String name,
long checkInterval) |
限定符和类型 | 方法和说明 |
---|---|
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, java.lang.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
在类中 TrafficCounter
public void stop()
stop
在类中 TrafficCounter
public void resetCumulativeTime()
TrafficCounter
resetCumulativeTime
在类中 TrafficCounter