Fix checkstyle
This commit is contained in:
parent
f120e55855
commit
8d5f29639c
@ -88,10 +88,11 @@ public abstract class AbstractTrafficShapingHandler extends
|
|||||||
* Timer to associated to any TrafficCounter
|
* Timer to associated to any TrafficCounter
|
||||||
*/
|
*/
|
||||||
protected Timer timer;
|
protected Timer timer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* used in releaseExternalResources() to cancel the timer
|
* used in releaseExternalResources() to cancel the timer
|
||||||
*/
|
*/
|
||||||
volatile private Timeout timeout = null;
|
private volatile Timeout timeout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit in B/s to apply to write
|
* Limit in B/s to apply to write
|
||||||
@ -286,7 +287,7 @@ public abstract class AbstractTrafficShapingHandler extends
|
|||||||
writeLimit = newWriteLimit;
|
writeLimit = newWriteLimit;
|
||||||
readLimit = newReadLimit;
|
readLimit = newReadLimit;
|
||||||
if (trafficCounter != null) {
|
if (trafficCounter != null) {
|
||||||
trafficCounter.resetAccounting(System.currentTimeMillis()+1);
|
trafficCounter.resetAccounting(System.currentTimeMillis() + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ import org.jboss.netty.util.Timer;
|
|||||||
* <li>Add in your pipeline a new ChannelTrafficShapingHandler, before a recommended {@link ExecutionHandler} (like
|
* <li>Add in your pipeline a new ChannelTrafficShapingHandler, before a recommended {@link ExecutionHandler} (like
|
||||||
* {@link OrderedMemoryAwareThreadPoolExecutor} or {@link MemoryAwareThreadPoolExecutor}).<br>
|
* {@link OrderedMemoryAwareThreadPoolExecutor} or {@link MemoryAwareThreadPoolExecutor}).<br>
|
||||||
* <tt>ChannelTrafficShapingHandler myHandler = new ChannelTrafficShapingHandler(timer);</tt><br>
|
* <tt>ChannelTrafficShapingHandler myHandler = new ChannelTrafficShapingHandler(timer);</tt><br>
|
||||||
* timer could be created using <tt>HashedWheelTimer<tt><br>
|
* timer could be created using <tt>HashedWheelTimer</tt><br>
|
||||||
* <tt>pipeline.addLast("CHANNEL_TRAFFIC_SHAPING", myHandler);</tt><br><br>
|
* <tt>pipeline.addLast("CHANNEL_TRAFFIC_SHAPING", myHandler);</tt><br><br>
|
||||||
*
|
*
|
||||||
* <b>Note that this handler has a Pipeline Coverage of "one" which means a new handler must be created
|
* <b>Note that this handler has a Pipeline Coverage of "one" which means a new handler must be created
|
||||||
|
@ -31,7 +31,7 @@ import org.jboss.netty.util.Timer;
|
|||||||
* <ul>
|
* <ul>
|
||||||
* <li>Create your unique GlobalTrafficShapingHandler like:<br><br>
|
* <li>Create your unique GlobalTrafficShapingHandler like:<br><br>
|
||||||
* <tt>GlobalTrafficShapingHandler myHandler = new GlobalTrafficShapingHandler(timer);</tt><br><br>
|
* <tt>GlobalTrafficShapingHandler myHandler = new GlobalTrafficShapingHandler(timer);</tt><br><br>
|
||||||
* timer could be created using <tt>HashedWheelTimer<tt><br>
|
* timer could be created using <tt>HashedWheelTimer</tt><br>
|
||||||
* <tt>pipeline.addLast("GLOBAL_TRAFFIC_SHAPING", myHandler);</tt><br><br>
|
* <tt>pipeline.addLast("GLOBAL_TRAFFIC_SHAPING", myHandler);</tt><br><br>
|
||||||
*
|
*
|
||||||
* <b>Note that this handler has a Pipeline Coverage of "all" which means only one such handler must be created
|
* <b>Note that this handler has a Pipeline Coverage of "all" which means only one such handler must be created
|
||||||
|
@ -113,7 +113,7 @@ public class TrafficCounter {
|
|||||||
/**
|
/**
|
||||||
* used in stop() to cancel the timer
|
* used in stop() to cancel the timer
|
||||||
*/
|
*/
|
||||||
volatile private Timeout timeout = null;
|
private volatile Timeout timeout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is Monitor active
|
* Is Monitor active
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
*
|
*
|
||||||
* The insertion in the pipeline of one of those handlers can be wherever you want, but
|
* The insertion in the pipeline of one of those handlers can be wherever you want, but
|
||||||
* <b>it must be placed before any <tt>{@link MemoryAwareThreadPoolExecutor}</tt>
|
* <b>it must be placed before any <tt>{@link MemoryAwareThreadPoolExecutor}</tt>
|
||||||
* in your pipeline</b>.</li><br>
|
* in your pipeline</b>.<br>
|
||||||
* <b><i>It is really recommended to have such a</i> <tt>{@link MemoryAwareThreadPoolExecutor}</tt>
|
* <b><i>It is really recommended to have such a</i> <tt>{@link MemoryAwareThreadPoolExecutor}</tt>
|
||||||
* <i>(either non ordered or </i> <tt>{@link OrderedMemoryAwareThreadPoolExecutor}</tt>
|
* <i>(either non ordered or </i> <tt>{@link OrderedMemoryAwareThreadPoolExecutor}</tt>
|
||||||
* <i>) in your pipeline</i></b>
|
* <i>) in your pipeline</i></b>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
*
|
*
|
||||||
* <P>So in your application you will create your own TrafficShapingHandler and set the values to fit your needs.</P>
|
* <P>So in your application you will create your own TrafficShapingHandler and set the values to fit your needs.</P>
|
||||||
* <tt>XXXXXTrafficShapingHandler myHandler = new XXXXXTrafficShapingHandler(timer);</tt><br><br>
|
* <tt>XXXXXTrafficShapingHandler myHandler = new XXXXXTrafficShapingHandler(timer);</tt><br><br>
|
||||||
* timer could be created using <tt>HashedWheelTimer<tt> and XXXXX could be either
|
* timer could be created using <tt>HashedWheelTimer</tt> and XXXXX could be either
|
||||||
* Global or Channel<br>
|
* Global or Channel<br>
|
||||||
* <tt>pipeline.addLast("XXXXX_TRAFFIC_SHAPING", myHandler);</tt><br>
|
* <tt>pipeline.addLast("XXXXX_TRAFFIC_SHAPING", myHandler);</tt><br>
|
||||||
* <tt>...</tt><br>
|
* <tt>...</tt><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user