@Override
  public boolean addReplica(ReplicaId replicaId) {
    lock.lock();
    logger.info("Adding replica {}", replicaId);
    DiskId diskId = replicaId.getDiskId();
    diskIdToReplicaQueue.putIfAbsent(diskId, new LinkedHashSet<>());
    boolean isAlreadyPresent = diskIdToReplicaQueue.get(diskId).add(replicaId);
    logger.trace("after adding queue for disk {} is {}", diskId, diskIdToReplicaQueue.get(diskId));
    lock.unlock();
    return isAlreadyPresent;
  }
Adds replicas to a queue which will be prioritized
@param replicaId the {@link ReplicaId} to add.
@return true if replica is added , false if replica is already present
ambry-prioritization/src/main/java/com/github/ambry/replica/prioritization/FileCopyDisruptionBasedPrioritizationManager.java