public static ByteBuffer allocateCommBuffer(int size, Socket sock) {
    // I expect that size will almost always be the same value
    if (sock.getChannel() == null) {
      // The socket this commBuffer will be used for is old IO (it has no channel).
      // So the commBuffer should be heap based.
      return ByteBuffer.allocate(size);
    }
    LinkedBlockingQueue<ByteBuffer> q = commBufferMap.get(size);
    ByteBuffer result = null;
    if (q != null) {
      result = q.poll();
    }
    if (result == null) {
      result = ByteBuffer.allocateDirect(size);
    } else {
      result.position(0);
      result.limit(result.capacity());
    }
    return result;
  }
The threadMonitorExecutor for this server connection.
This will be null if acceptor is a selector.
When a selector is used, the thread pool that is used to process client requests
will automatically register with the thread monitor the thread that is processing
the request. So no need to create a threadMonitorExecutor.
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java