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,
ScheduledExecutorService executor,
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.
|
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, ScheduledExecutorService executor, 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
in class TrafficCounter
public void stop()
stop
in class TrafficCounter
public void resetCumulativeTime()
TrafficCounter
resetCumulativeTime
in class TrafficCounter
Copyright © 2008–2017 The Netty Project. All rights reserved.