public class ReplicaSortFunctionFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.function.Function<Replica,java.lang.Integer> |
deprioritizeDiskImmigrants()
This priority function can be used together with
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the immigrant replicas for the disk. |
static java.util.function.Function<Replica,java.lang.Integer> |
deprioritizeImmigrants()
This priority function can be used together with
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the immigrant replicas. |
static java.util.function.Function<Replica,java.lang.Integer> |
deprioritizeOfflineReplicas()
This priority function can be used together with
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the offline replicas. |
static java.util.function.Function<Replica,java.lang.Integer> |
deprioritizeOfflineReplicasThenImmigrants()
This priority function can be used together with
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the offline replicas then immigrants. |
static java.util.function.Function<Replica,java.lang.Integer> |
prioritizeDiskImmigrants() |
static java.util.function.Function<Replica,java.lang.Integer> |
prioritizeImmigrants() |
static java.util.function.Function<Replica,java.lang.Integer> |
prioritizeOfflineReplicas() |
static java.util.function.Function<Replica,java.lang.Integer> |
prioritizeOfflineReplicasThenImmigrants() |
static java.util.function.Function<Replica,java.lang.Boolean> |
selectImmigrantLeaders() |
static java.util.function.Function<Replica,java.lang.Boolean> |
selectImmigrants() |
static java.util.function.Function<Replica,java.lang.Boolean> |
selectLeaders() |
static java.util.function.Function<Replica,java.lang.Boolean> |
selectOnlineReplicas() |
static java.util.function.Function<Replica,java.lang.Double> |
sortByMetricGroupValue(java.lang.String metricGroup) |
static java.util.function.Function<Replica,java.lang.Double> |
sortByMetricValue(java.lang.String metricName) |
public static java.util.function.Function<Replica,java.lang.Double> sortByMetricValue(java.lang.String metricName)
metricName
- the metric name to scorepublic static java.util.function.Function<Replica,java.lang.Double> sortByMetricGroupValue(java.lang.String metricGroup)
metricGroup
- the metric group to scorepublic static java.util.function.Function<Replica,java.lang.Integer> prioritizeImmigrants()
public static java.util.function.Function<Replica,java.lang.Integer> prioritizeOfflineReplicas()
public static java.util.function.Function<Replica,java.lang.Integer> prioritizeOfflineReplicasThenImmigrants()
public static java.util.function.Function<Replica,java.lang.Integer> deprioritizeImmigrants()
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the immigrant replicas.public static java.util.function.Function<Replica,java.lang.Integer> deprioritizeOfflineReplicas()
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the offline replicas.public static java.util.function.Function<Replica,java.lang.Integer> deprioritizeOfflineReplicasThenImmigrants()
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the offline replicas then immigrants.public static java.util.function.Function<Replica,java.lang.Integer> prioritizeDiskImmigrants()
public static java.util.function.Function<Replica,java.lang.Integer> deprioritizeDiskImmigrants()
SortedReplicas.reverselySortedReplicas()
to provide sorted replicas in descending order of score and prioritize the immigrant replicas for the disk.public static java.util.function.Function<Replica,java.lang.Boolean> selectImmigrants()
public static java.util.function.Function<Replica,java.lang.Boolean> selectLeaders()
public static java.util.function.Function<Replica,java.lang.Boolean> selectOnlineReplicas()
public static java.util.function.Function<Replica,java.lang.Boolean> selectImmigrantLeaders()