private boolean removeReplicaFromMap(DiskId diskId, ReplicaId replicaId, boolean removeInProgress) {
    validateIfPzManagerIsRunningOrThrowException(replicaId);

    List<ReplicaId> replicaListForDisk;
    if(removeInProgress)
        replicaListForDisk = inProgressReplicas.get(diskId);
    else
        replicaListForDisk = diskToReplicaMap.get(diskId);

    if (replicaListForDisk == null || replicaListForDisk.isEmpty()) {
      return false;
    }
    logger.info("Removed {} partition {} from prioritization Manager For Disk {}", removeInProgress? "InProgress": "", replicaId.getReplicaPath(),
        diskId.getMountPath());
    return replicaListForDisk.remove(replicaId);

  }
The FCFSPrioritizationManager is a First-Come-First-Serve implementation of the PrioritizationManager.
ambry-prioritization/src/main/java/com/github/ambry/replica/prioritization/FCFSPrioritizationManager.java