private ExecutorService getBatchPool() throws IOException {
    if (batchPool == null) {
      synchronized (this) {
        if (isClosed()) {
          throw new DoNotRetryIOException("Connection is closed");
        }
        if (batchPool == null) {
          this.batchPool = createThreadPool();
        }
      }
    }
    return this.batchPool;
  }
The connection implementation based on {@link AsyncConnection}.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionOverAsyncConnection.java