Class GlobalChannelTrafficCounter
java.lang.Object
org.jboss.netty.handler.traffic.TrafficCounter
org.jboss.netty.handler.traffic.GlobalChannelTrafficCounter
Version for
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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classClass to implement monitoring at fix delay. -
Field Summary
Fields inherited from class TrafficCounter
checkInterval, lastTime, monitorActive, name, timeout, timer, timerTask, trafficShapingHandler -
Constructor Summary
ConstructorsConstructorDescriptionGlobalChannelTrafficCounter(GlobalChannelTrafficShapingHandler trafficShapingHandler, Timer timer, String name, long checkInterval) -
Method Summary
Methods inherited from class TrafficCounter
bytesRealWriteFlowControl, bytesRecvFlowControl, bytesWriteFlowControl, configure, getCheckInterval, getCumulativeReadBytes, getCumulativeWrittenBytes, getCurrentReadBytes, getCurrentWrittenBytes, getLastCumulativeTime, getLastReadBytes, getLastReadThroughput, getLastTime, getLastWriteThroughput, getLastWrittenBytes, getName, getRealWriteThroughput, getRealWrittenBytes, milliSecondFromNano, readTimeToWait, readTimeToWait, resetAccounting, toString, writeTimeToWait, writeTimeToWait
-
Constructor Details
-
GlobalChannelTrafficCounter
public GlobalChannelTrafficCounter(GlobalChannelTrafficShapingHandler trafficShapingHandler, Timer timer, String name, long checkInterval) - Parameters:
trafficShapingHandler- the associatedGlobalChannelTrafficShapingHandler.name- the name given to this monitorcheckInterval- the checkInterval in millisecond between two computations.
-
-
Method Details
-
start
-
stop
-
resetCumulativeTime
public void resetCumulativeTime()Description copied from class:TrafficCounterReset both read and written cumulative bytes counters and the associated absolute time from System.currentTimeMillis().- Overrides:
resetCumulativeTimein classTrafficCounter
-