protected CompletableFuture<Integer> asyncReplicate(List<Entry> entries, int batchIndex,
    int timeout) {
    return isSerial
      ? serialReplicateRegionEntries(Iterators.peekingIterator(entries.iterator()), batchIndex,
        timeout)
      : replicateEntries(entries, batchIndex, timeout);
  }
Replicate entries to peer cluster by async API.
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/HBaseInterClusterReplicationEndpoint.java