void poll(List<RequestInfo> requestsToSend, Set<Integer> requestsToDrop) {
    long startTime = time.milliseconds();
    requestRegistrationCallback.setRequestsToSend(requestsToSend);
    requestRegistrationCallback.setRequestsToDrop(requestsToDrop);
    for (PutOperation op : putOperations) {
      try {
        op.poll(requestRegistrationCallback);
      } catch (Exception e) {
        op.setOperationExceptionAndComplete(
            new RouterException("Put poll encountered unexpected error", e, RouterErrorCode.UnexpectedInternalError));
      }
      if (op.isOperationComplete() && putOperations.remove(op)) {
        // In order to ensure that an operation is completed only once, call onComplete() only at the place where the
        // operation actually gets removed from the set of operations. See comment within closePendingOperations().
        onComplete(op);
      }
    }
    routerMetrics.putManagerPollTimeMs.update(time.milliseconds() - startTime);
  }
Creates and returns requests in the form of {@link RequestInfo} to be sent to data nodes in order to
complete put operations. Since this is the only method guaranteed to be called periodically by the
RequestResponseHandler thread in the {@link NonBlockingRouter} ({@link #handleResponse} gets called only if a
response is received for a put operation), any error handling or operation completion and cleanup also usually
gets done in the context of this method.
@param requestsToSend list to be filled with the requests created
@param requestsToDrop list to be filled with the requests to drop.
ambry-router/src/main/java/com/github/ambry/router/PutManager.java