public ServerName acquirePeerWorker(String peerId, Procedure<?> proc)
    throws ProcedureSuspendedException {
    UsedReplayWorkersForPeer usedWorkers = usedWorkersByPeer.get(peerId);
    synchronized (usedWorkers) {
      Optional<ServerName> worker = usedWorkers.acquire(serverManager);
      if (worker.isPresent()) {
        return worker.get();
      }
      // no worker available right now, suspend the procedure
      usedWorkers.suspend(proc);
    }
    throw new ProcedureSuspendedException();
  }
Get a worker for replaying remote wal for a give peer. If no worker available, i.e, all the
region servers have been used by others, a {@link ProcedureSuspendedException} will be thrown
to suspend the procedure. And it will be woken up later when there are available workers,
either by others release a worker, or there is a new region server joins the cluster.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/SyncReplicationReplayWALManager.java