public class MaxPerZoneRule extends MaxPerRule
max| Constructor and Description |
|---|
MaxPerZoneRule(int maxPerZone) |
MaxPerZoneRule(int maxPerZone,
StringMatcher taskFilter) |
| Modifier and Type | Method and Description |
|---|---|
EvaluationOutcome |
filter(Protos.Offer offer,
PodInstance podInstance,
java.util.Collection<Protos.TaskInfo> tasks)
Returns whether the provided
Offer, combined with the accompanying
TaskInfos, passes or fails this placement constraint. |
java.util.Collection<java.lang.String> |
getKeys(Protos.Offer offer) |
java.util.Collection<java.lang.String> |
getKeys(Protos.TaskInfo taskInfo) |
java.util.Collection<PlacementField> |
getPlacementFields()
Returns the
PlacementFields to which this rule applies. |
equals, getTaskFilter, hashCode, isAcceptablepublic MaxPerZoneRule(int maxPerZone)
public MaxPerZoneRule(int maxPerZone,
StringMatcher taskFilter)
public java.util.Collection<java.lang.String> getKeys(Protos.TaskInfo taskInfo)
getKeys in class MaxPerRulepublic java.util.Collection<java.lang.String> getKeys(Protos.Offer offer)
getKeys in class MaxPerRulepublic EvaluationOutcome filter(Protos.Offer offer, PodInstance podInstance, java.util.Collection<Protos.TaskInfo> tasks)
PlacementRuleOffer, combined with the accompanying
TaskInfos, passes or fails this placement constraint.offer - the offer to be examinedtasks - the currently deployed tasks in the system, possibly including a duplicate
of the task being launched as represented in the offerRequirement. Use
PlacementUtils.areEquivalent(TaskInfo, PodInstance) to detect
duplicatesEvaluationOutcome object describing whether the placement succeeded or failed and whypublic java.util.Collection<PlacementField> getPlacementFields()
PlacementRulePlacementFields to which this rule applies.