@Override protected void doBeginRead() throws Exception { if (readPending) { return; } readPending = true; eventLoop().execute(readTask); }
@Override protected void doBeginRead() throws Exception { if (readPending) { return; } readPending = true; eventLoop().execute(readTask); }
@Override protected void doBeginRead() throws Exception { if (readPending) { return; } readPending = true; eventLoop().execute(readTask); }
/** * Set read pending to {@code false}. */ protected final void clearReadPending() { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { readPending = false; } else { eventLoop.execute(clearReadPendingRunnable); } } else { // Best effort if we are not registered yet clear readPending. This happens during channel initialization. readPending = false; } } }
/** * @deprecated Use {@link #clearReadPending()} if appropriate instead. * No longer supported. */ @Deprecated protected void setReadPending(final boolean readPending) { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { this.readPending = readPending; } else { eventLoop.execute(new Runnable() { @Override public void run() { AbstractOioChannel.this.readPending = readPending; } }); } } else { this.readPending = readPending; } }
/** * @deprecated Use {@link #clearReadPending()} if appropriate instead. * No longer supported. */ @Deprecated protected void setReadPending(final boolean readPending) { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { this.readPending = readPending; } else { eventLoop.execute(new Runnable() { @Override public void run() { AbstractOioChannel.this.readPending = readPending; } }); } } else { this.readPending = readPending; } }
/** * Set read pending to {@code false}. */ protected final void clearReadPending() { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { readPending = false; } else { eventLoop.execute(clearReadPendingRunnable); } } else { // Best effort if we are not registered yet clear readPending. This happens during channel initialization. readPending = false; } } }
/** * @deprecated Use {@link #clearReadPending()} if appropriate instead. * No longer supported. */ @Deprecated protected void setReadPending(final boolean readPending) { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { this.readPending = readPending; } else { eventLoop.execute(new Runnable() { @Override public void run() { AbstractOioChannel.this.readPending = readPending; } }); } } else { this.readPending = readPending; } }
/** * Set read pending to {@code false}. */ protected final void clearReadPending() { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { readPending = false; } else { eventLoop.execute(clearReadPendingRunnable); } } else { // Best effort if we are not registered yet clear readPending. This happens during channel initialization. readPending = false; } } }
@Override protected void doBeginRead() throws Exception { if (readPending) { return; } readPending = true; eventLoop().execute(readTask); }
@Override protected void doBeginRead() throws Exception { if (readPending) { return; } readPending = true; eventLoop().execute(readTask); }
@Override protected void doBeginRead() throws Exception { if (readPending) { return; } readPending = true; eventLoop().execute(readTask); }
/** * @deprecated Use {@link #clearReadPending()} if appropriate instead. * No longer supported. */ @Deprecated protected void setReadPending(final boolean readPending) { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { this.readPending = readPending; } else { eventLoop.execute(new Runnable() { @Override public void run() { AbstractOioChannel.this.readPending = readPending; } }); } } else { this.readPending = readPending; } }
/** * @deprecated Use {@link #clearReadPending()} if appropriate instead. * No longer supported. */ @Deprecated protected void setReadPending(final boolean readPending) { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { this.readPending = readPending; } else { eventLoop.execute(new Runnable() { @Override public void run() { AbstractOioChannel.this.readPending = readPending; } }); } } else { this.readPending = readPending; } }
/** * @deprecated Use {@link #clearReadPending()} if appropriate instead. * No longer supported. */ @Deprecated protected void setReadPending(final boolean readPending) { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { this.readPending = readPending; } else { eventLoop.execute(new Runnable() { @Override public void run() { AbstractOioChannel.this.readPending = readPending; } }); } } else { this.readPending = readPending; } }
/** * Set read pending to {@code false}. */ protected final void clearReadPending() { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { readPending = false; } else { eventLoop.execute(clearReadPendingRunnable); } } else { // Best effort if we are not registered yet clear readPending. This happens during channel initialization. readPending = false; } } }
/** * Set read pending to {@code false}. */ protected final void clearReadPending() { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { readPending = false; } else { eventLoop.execute(clearReadPendingRunnable); } } else { // Best effort if we are not registered yet clear readPending. This happens during channel initialization. readPending = false; } } }
/** * Set read pending to {@code false}. */ protected final void clearReadPending() { if (isRegistered()) { EventLoop eventLoop = eventLoop(); if (eventLoop.inEventLoop()) { readPending = false; } else { eventLoop.execute(clearReadPendingRunnable); } } else { // Best effort if we are not registered yet clear readPending. This happens during channel initialization. readPending = false; } } }