public class AttributeRule extends StringMatcherRule
AttributeStringUtils.toString(Attribute)| Constructor and Description |
|---|
AttributeRule(StringMatcher matcher) |
| Modifier and Type | Method and Description |
|---|---|
EvaluationOutcome |
filter(Offer offer,
PodInstance podInstance,
java.util.Collection<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(Offer offer) |
java.util.Collection<PlacementField> |
getPlacementFields()
Returns the
PlacementFields to which this rule applies. |
equals, getMatcher, hashCode, isAcceptable, toStringpublic AttributeRule(StringMatcher matcher)
public EvaluationOutcome filter(Offer offer, PodInstance podInstance, java.util.Collection<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.public java.util.Collection<java.lang.String> getKeys(Offer offer)
getKeys in class StringMatcherRule