private void registerWrites() {
    Iterator<SimpleServerRpcConnection> it = writingCons.iterator();
    while (it.hasNext()) {
      SimpleServerRpcConnection c = it.next();
      it.remove();
      SelectionKey sk = c.channel.keyFor(writeSelector);
      try {
        if (sk == null) {
          try {
            c.channel.register(writeSelector, SelectionKey.OP_WRITE, c);
          } catch (ClosedChannelException e) {
            // ignore: the client went away.
            if (SimpleRpcServer.LOG.isTraceEnabled()) SimpleRpcServer.LOG.trace("ignored", e);
          }
        } else {
          sk.interestOps(SelectionKey.OP_WRITE);
        }
      } catch (CancelledKeyException e) {
        // ignore: the client went away.
        if (SimpleRpcServer.LOG.isTraceEnabled()) SimpleRpcServer.LOG.trace("ignored", e);
      }
    }
  }
Take the list of the connections that want to write, and register them in the selector.
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/SimpleRpcServerResponder.java