/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Change checkInterval between two computations in millisecond. * * @param newCheckInterval The new check interval (in milliseconds) */ public void configure(long newCheckInterval) { long newInterval = newCheckInterval / 10 * 10; if (checkInterval.getAndSet(newInterval) != newInterval) { if (newInterval <= 0) { stop(); // No more active monitoring lastTime.set(milliSecondFromNano()); } else { // Start if necessary start(); } } }
/** * Change checkInterval between two computations in millisecond. * * @param newCheckInterval The new check interval (in milliseconds) */ public void configure(long newCheckInterval) { long newInterval = newCheckInterval / 10 * 10; if (checkInterval.getAndSet(newInterval) != newInterval) { if (newInterval <= 0) { stop(); // No more active monitoring lastTime.set(milliSecondFromNano()); } else { // Start if necessary start(); } } }
@Override public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { trafficCounter.stop(); // write order control synchronized (this) { if (ctx.channel().isActive()) { for (ToSend toSend : messagesQueue) { long size = calculateSize(toSend.toSend); trafficCounter.bytesRealWriteFlowControl(size); queueSize -= size; ctx.write(toSend.toSend, toSend.promise); } } else { for (ToSend toSend : messagesQueue) { if (toSend.toSend instanceof ByteBuf) { ((ByteBuf) toSend.toSend).release(); } } } messagesQueue.clear(); } releaseWriteSuspended(ctx); releaseReadSuspended(ctx); super.handlerRemoved(ctx); }
@Override public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { trafficCounter.stop(); // write order control synchronized (this) { if (ctx.channel().isActive()) { for (ToSend toSend : messagesQueue) { long size = calculateSize(toSend.toSend); trafficCounter.bytesRealWriteFlowControl(size); queueSize -= size; ctx.write(toSend.toSend, toSend.promise); } } else { for (ToSend toSend : messagesQueue) { if (toSend.toSend instanceof ByteBuf) { ((ByteBuf) toSend.toSend).release(); } } } messagesQueue.clear(); } releaseWriteSuspended(ctx); releaseReadSuspended(ctx); super.handlerRemoved(ctx); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Change checkInterval between two computations in millisecond. * * @param newCheckInterval The new check interval (in milliseconds) */ public void configure(long newCheckInterval) { long newInterval = newCheckInterval / 10 * 10; if (checkInterval.getAndSet(newInterval) != newInterval) { if (newInterval <= 0) { stop(); // No more active monitoring lastTime.set(milliSecondFromNano()); } else { // Start if necessary start(); } } }
@Override public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { trafficCounter.stop(); // write order control synchronized (this) { if (ctx.channel().isActive()) { for (ToSend toSend : messagesQueue) { long size = calculateSize(toSend.toSend); trafficCounter.bytesRealWriteFlowControl(size); queueSize -= size; ctx.write(toSend.toSend, toSend.promise); } } else { for (ToSend toSend : messagesQueue) { if (toSend.toSend instanceof ByteBuf) { ((ByteBuf) toSend.toSend).release(); } } } messagesQueue.clear(); } releaseWriteSuspended(ctx); releaseReadSuspended(ctx); super.handlerRemoved(ctx); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Release all internal resources of this instance. */ public final void release() { trafficCounter.stop(); }
/** * Change checkInterval between two computations in millisecond. * * @param newCheckInterval The new check interval (in milliseconds) */ public void configure(long newCheckInterval) { long newInterval = newCheckInterval / 10 * 10; if (checkInterval.getAndSet(newInterval) != newInterval) { if (newInterval <= 0) { stop(); // No more active monitoring lastTime.set(milliSecondFromNano()); } else { // Start if necessary start(); } } }
/** * Change checkInterval between two computations in millisecond. * * @param newCheckInterval The new check interval (in milliseconds) */ public void configure(long newCheckInterval) { long newInterval = newCheckInterval / 10 * 10; if (checkInterval.getAndSet(newInterval) != newInterval) { if (newInterval <= 0) { stop(); // No more active monitoring lastTime.set(milliSecondFromNano()); } else { // Start if necessary start(); } } }