@ChannelHandler.Sharable public class GlobalTrafficShapingHandler extends AbstractTrafficShapingHandler
AbstractTrafficShapingHandler
is for global
traffic shaping, that is to say a global limitation of the bandwidth, whatever
the number of opened channels.ExecutionHandler
(like
OrderedMemoryAwareThreadPoolExecutor
or MemoryAwareThreadPoolExecutor
).ChannelHandler.Sharable
checkInterval, DEFAULT_CHECK_INTERVAL, DEFAULT_MAX_TIME, maxTime, timer, trafficCounter
Constructor and Description |
---|
GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer) |
GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long checkInterval) |
GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long writeLimit,
long readLimit) |
GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long writeLimit,
long readLimit,
long checkInterval) |
GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long writeLimit,
long readLimit,
long checkInterval,
long maxTime) |
GlobalTrafficShapingHandler(Timer timer) |
GlobalTrafficShapingHandler(Timer timer,
long checkInterval) |
GlobalTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit) |
GlobalTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit,
long checkInterval) |
GlobalTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit,
long checkInterval,
long maxTime) |
Modifier and Type | Method and Description |
---|---|
void |
channelClosed(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel was closed and all its related resources
were released. |
void |
channelConnected(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel is open, bound to a local address, and
connected to a remote address. |
protected void |
submitWrite(ChannelHandlerContext ctx,
MessageEvent evt,
long delay) |
configure, configure, configure, doAccounting, getCheckInterval, getMaxTimeWait, getReadLimit, getTrafficCounter, getWriteLimit, handleDownstream, internalSubmitWrite, messageReceived, releaseExternalResources, setCheckInterval, setMaxTimeWait, setReadLimit, setWriteLimit, toString, writeRequested
bindRequested, channelBound, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete
public GlobalTrafficShapingHandler(Timer timer, long writeLimit, long readLimit, long checkInterval)
public GlobalTrafficShapingHandler(Timer timer, long writeLimit, long readLimit, long checkInterval, long maxTime)
public GlobalTrafficShapingHandler(Timer timer, long writeLimit, long readLimit)
public GlobalTrafficShapingHandler(Timer timer, long checkInterval)
public GlobalTrafficShapingHandler(Timer timer)
public GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long writeLimit, long readLimit, long checkInterval)
public GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long writeLimit, long readLimit, long checkInterval, long maxTime)
public GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long writeLimit, long readLimit)
public GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long checkInterval)
public GlobalTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer)
protected void submitWrite(ChannelHandlerContext ctx, MessageEvent evt, long delay) throws Exception
submitWrite
in class AbstractTrafficShapingHandler
Exception
public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelHandler
Channel
is open, bound to a local address, and
connected to a remote address.channelConnected
in class SimpleChannelHandler
Exception
public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelHandler
Channel
was closed and all its related resources
were released.channelClosed
in class SimpleChannelHandler
Exception
Copyright © 2008-2015 The Netty Project. All Rights Reserved.