PlacementConstraint.Visitablepublic static class PlacementConstraint.SingleConstraint extends PlacementConstraint.AbstractConstraint
{RACK, 2, 10,
allocationTag("zk")}, requires an allocation to be placed within a rack
that has at least 2 and at most 10 other allocations with tag "zk".| Constructor | Description |
|---|---|
SingleConstraint(java.lang.String scope,
int minCardinality,
int maxCardinality,
java.util.Set<PlacementConstraint.TargetExpression> targetExpressions) |
|
SingleConstraint(java.lang.String scope,
int minCardinality,
int maxCardinality,
NodeAttributeOpCode opCode,
java.util.Set<PlacementConstraint.TargetExpression> targetExpressions) |
|
SingleConstraint(java.lang.String scope,
int minC,
int maxC,
NodeAttributeOpCode opCode,
PlacementConstraint.TargetExpression... targetExpressions) |
|
SingleConstraint(java.lang.String scope,
int minC,
int maxC,
PlacementConstraint.TargetExpression... targetExpressions) |
| Modifier and Type | Method | Description |
|---|---|---|
<T> T |
accept(PlacementConstraint.Visitor<T> visitor) |
Visitor pattern.
|
boolean |
equals(java.lang.Object o) |
|
int |
getMaxCardinality() |
Get the maximum cardinality of the constraint.
|
int |
getMinCardinality() |
Get the minimum cardinality of the constraint.
|
NodeAttributeOpCode |
getNodeAttributeOpCode() |
Get the NodeAttributeOpCode of the constraint.
|
java.lang.String |
getScope() |
Get the scope of the constraint.
|
java.util.Set<PlacementConstraint.TargetExpression> |
getTargetExpressions() |
Get the target expressions of the constraint.
|
int |
hashCode() |
|
java.lang.String |
toString() |
buildpublic SingleConstraint(java.lang.String scope,
int minCardinality,
int maxCardinality,
NodeAttributeOpCode opCode,
java.util.Set<PlacementConstraint.TargetExpression> targetExpressions)
public SingleConstraint(java.lang.String scope,
int minCardinality,
int maxCardinality,
java.util.Set<PlacementConstraint.TargetExpression> targetExpressions)
public SingleConstraint(java.lang.String scope,
int minC,
int maxC,
PlacementConstraint.TargetExpression... targetExpressions)
public SingleConstraint(java.lang.String scope,
int minC,
int maxC,
NodeAttributeOpCode opCode,
PlacementConstraint.TargetExpression... targetExpressions)
public java.lang.String getScope()
public int getMinCardinality()
public int getMaxCardinality()
public java.util.Set<PlacementConstraint.TargetExpression> getTargetExpressions()
public NodeAttributeOpCode getNodeAttributeOpCode()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class PlacementConstraint.AbstractConstraintpublic <T> T accept(PlacementConstraint.Visitor<T> visitor)
PlacementConstraint.VisitableT - defines the type that the visitor will use and the return type
of the accept.visitor - visitor to be usedCopyright © 2008–2025 Apache Software Foundation. All rights reserved.