private void disableWrite() { if (shouldWrite) { listener.modifyInterestOpsBatch(this, SelectionKey.OP_WRITE, false); shouldWrite = false; } }
/** * Batch version of modifyInterestOps(). * * @return Returns a <code>this</code> reference for chaining */ public Listener modifyInterestOpsBatch(Connection connection, int op, boolean set) { return modifyInterestOpsBatch( connection.socketChannel().keyFor(selector), op, set); }