@Override
    public ReplicaId next() {
      if (!hasNext()) {
        throw new NoSuchElementException();
      }

      if (hasNextLocal()) {
        lastReturnedByIterator = localReplicas.removeFirst();
      } else {
        // At this point, hasNextRemote() must be true
        lastReturnedByIterator = remoteReplicas.removeFirst();
      }
      return lastReturnedByIterator;
    }
Check if the operation has failed locally (i.e. in the local data center).
@return true if we have received enough failed responses from local replicas that the operation cannot possibly
succeed, false otherwise.
ambry-router/src/main/java/com/github/ambry/router/ParanoidDurabilityOperationTracker.java