private Map<PriorityTier, Set<PartitionId>> prioritizePartitions(Set<PartitionId> partitionIds, Map<PartitionId, List<Operation>> disruptionsByPartition) {
    // Filter disruptions within our window
    Map<PartitionId, Boolean> hasUpcomingDisruption = populateDisruptionData(disruptionsByPartition);

    // Categorize all partitions
    Map<PriorityTier, Set<PartitionId>> result = assignPriorityTierToPartitions(partitionIds, hasUpcomingDisruption);

    return result;
  }
Prioritizes partitions based on replica count and disruption status.

@param partitionIds Set of all partitions to evaluate
@param disruptionsByPartition Map of partitions to their disruptions
@return Map of priority categories to sets of partitions
ambry-prioritization/src/main/java/com/github/ambry/replica/prioritization/ReplicationPrioritizationManager.java