@Override public void deregister(ChannelPromise promise) { EmbeddedUnsafe.this.deregister(promise); runPendingTasks(); }
private void flushOutbound0() { // We need to call runPendingTasks first as a ChannelOutboundHandler may used eventloop.execute(...) to // delay the write on the next eventloop run. runPendingTasks(); flush(); }
@Override public void bind(SocketAddress localAddress, ChannelPromise promise) { EmbeddedUnsafe.this.bind(localAddress, promise); runPendingTasks(); }
@Override public void beginRead() { EmbeddedUnsafe.this.beginRead(); runPendingTasks(); }
private void finishPendingTasks(boolean cancel) { runPendingTasks(); if (cancel) { // Cancel all scheduled tasks that are left. loop.cancelScheduledTasks(); } }
@Override public void flush() { EmbeddedUnsafe.this.flush(); runPendingTasks(); }
@Override public void closeForcibly() { EmbeddedUnsafe.this.closeForcibly(); runPendingTasks(); }
@Override public void register(EventLoop eventLoop, ChannelPromise promise) { EmbeddedUnsafe.this.register(eventLoop, promise); runPendingTasks(); }
@Override public void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) { EmbeddedUnsafe.this.connect(remoteAddress, localAddress, promise); runPendingTasks(); }
@Override public void disconnect(ChannelPromise promise) { EmbeddedUnsafe.this.disconnect(promise); runPendingTasks(); }
@Override public void close(ChannelPromise promise) { EmbeddedUnsafe.this.close(promise); runPendingTasks(); }
@Override public void write(Object msg, ChannelPromise promise) { EmbeddedUnsafe.this.write(msg, promise); runPendingTasks(); }
private void finishPendingTasks(boolean cancel) { runPendingTasks(); if (cancel) { // Cancel all scheduled tasks that are left. loop.cancelScheduledTasks(); } }
@Override public void closeForcibly() { EmbeddedUnsafe.this.closeForcibly(); runPendingTasks(); }
@Override public void disconnect(ChannelPromise promise) { EmbeddedUnsafe.this.disconnect(promise); runPendingTasks(); }
@Override public void flush() { EmbeddedUnsafe.this.flush(); runPendingTasks(); }
@Override public void write(Object msg, ChannelPromise promise) { EmbeddedUnsafe.this.write(msg, promise); runPendingTasks(); }
@Override public final ChannelFuture close(ChannelPromise promise) { // We need to call runPendingTasks() before calling super.close() as there may be something in the queue // that needs to be run before the actual close takes place. runPendingTasks(); ChannelFuture future = super.close(promise); // Now finish everything else and cancel all scheduled tasks that were not ready set. finishPendingTasks(true); return future; }
@Override public final ChannelFuture close(ChannelPromise promise) { // We need to call runPendingTasks() before calling super.close() as there may be something in the queue // that needs to be run before the actual close takes place. runPendingTasks(); ChannelFuture future = super.close(promise); // Now finish everything else and cancel all scheduled tasks that were not ready set. finishPendingTasks(true); return future; }
private ChannelFuture flushInbound(boolean recordException, ChannelPromise promise) { if (checkOpen(recordException)) { pipeline().fireChannelReadComplete(); runPendingTasks(); } return checkException(promise); }