void close() {
    if (isOpen.compareAndSet(true, false)) {
      for (UndeleteOperation op : undeleteOperations) {
        // There is a rare scenario where the operation gets removed from this set and gets completed concurrently by
        // the RequestResponseHandler thread when it is in poll() or handleResponse(). In order to avoid the completion
        // from happening twice, complete it here only if the remove was successful.
        if (undeleteOperations.remove(op)) {
          Exception e =
              new RouterException("Aborted operation because Router is closed.", RouterErrorCode.RouterClosed);
          routerMetrics.operationDequeuingRate.mark();
          routerMetrics.operationAbortCount.inc();
          routerMetrics.onUndeleteBlobError(e);
          nonBlockingRouter.completeOperation(op.getFutureResult(), op.getCallback(), null, e);
        }
      }
    }
  }
Closes the {@link UndeleteManager}. A {@link UndeleteManager} can be closed for only once. Any further close action
will have no effect.
ambry-router/src/main/java/com/github/ambry/router/UndeleteManager.java