diff --git a/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java b/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java index d97fb5a9a1..3e8f294aca 100644 --- a/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java +++ b/handler/src/main/java/io/netty/handler/traffic/AbstractTrafficShapingHandler.java @@ -15,7 +15,7 @@ */ package io.netty.handler.traffic; -import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import io.netty.channel.Channel; @@ -30,7 +30,9 @@ import io.netty.handler.execution.DefaultObjectSizeEstimator; import io.netty.logging.InternalLogger; import io.netty.logging.InternalLoggerFactory; import io.netty.util.ExternalResourceReleasable; -import io.netty.util.internal.ExecutorUtil; +import io.netty.util.Timeout; +import io.netty.util.Timer; +import io.netty.util.TimerTask; /** * AbstractTrafficShapingHandler allows to limit the global bandwidth @@ -41,6 +43,10 @@ import io.netty.util.internal.ExecutorUtil; * the method doAccounting of this handler.
*
* + * An {@link ObjectSizeEstimator} can be passed at construction to specify what + * is the size of the object to be read or write accordingly to the type of + * object. If not specified, it will used the {@link DefaultObjectSizeEstimator} implementation.

+ * * If you want for any particular reasons to stop the monitoring (accounting) or to change * the read/write limit or the check interval, several methods allow that for you:
*