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,
java.util.concurrent.ScheduledExecutorService executor,
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.
|
checkInterval, configure, cumulativeReadBytes, cumulativeWrittenBytes, currentReadBytes, currentWrittenBytes, getRealWriteThroughput, getRealWrittenBytes, lastCumulativeTime, lastReadBytes, lastReadThroughput, lastTime, lastWriteThroughput, lastWrittenBytes, milliSecondFromNano, name, readTimeToWait, readTimeToWait, toString, writeTimeToWait, writeTimeToWait
public GlobalChannelTrafficCounter(GlobalChannelTrafficShapingHandler trafficShapingHandler, java.util.concurrent.ScheduledExecutorService executor, java.lang.String name, long checkInterval)
trafficShapingHandler
- the associated GlobalChannelTrafficShapingHandler
.executor
- the underlying executor service for scheduling checks (both Global and per Channel).name
- the name given to this monitor.checkInterval
- the checkInterval in millisecond between two computations.public void start()
start
在类中 TrafficCounter
public void stop()
stop
在类中 TrafficCounter
public void resetCumulativeTime()
TrafficCounter
resetCumulativeTime
在类中 TrafficCounter