@InterfaceAudience.Public @InterfaceStability.Unstable public class PlacementConstraint extends Object implements Serializable
Constructor and Description |
---|
PlacementConstraint() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Long |
getMaxCardinality() |
Long |
getMinCardinality() |
String |
getName() |
Map<String,List<String>> |
getNodeAttributes() |
List<String> |
getNodePartitions() |
PlacementScope |
getScope() |
List<String> |
getTargetTags() |
PlacementType |
getType() |
int |
hashCode() |
PlacementConstraint |
maxCardinality(Long maxCardinality)
When placement type is cardinality, the maximum number of containers of the
depending component that a host should have, where containers of this
component can be allocated on.
|
PlacementConstraint |
minCardinality(Long minCardinality)
When placement type is cardinality, the minimum number of containers of the
depending component that a host should have, where containers of this
component can be allocated on.
|
PlacementConstraint |
name(String name)
An optional name associated to this constraint.
|
PlacementConstraint |
nodeAttributes(Map<String,List<String>> nodeAttributes)
Node attributes are a set of key:value(s) pairs associated with nodes.
|
PlacementConstraint |
nodePartitions(List<String> nodePartitions)
Node partitions where the containers of this component can run.
|
PlacementConstraint |
scope(PlacementScope scope)
The scope of placement.
|
void |
setMaxCardinality(Long maxCardinality) |
void |
setMinCardinality(Long minCardinality) |
void |
setName(String name) |
void |
setNodeAttributes(Map<String,List<String>> nodeAttributes) |
void |
setNodePartitions(List<String> nodePartitions) |
void |
setScope(PlacementScope scope) |
void |
setTargetTags(List<String> targetTags) |
void |
setType(PlacementType type) |
PlacementConstraint |
targetTags(List<String> targetTags)
The name of the components that this component's placement policy is
depending upon are added as target tags.
|
String |
toString() |
PlacementConstraint |
type(PlacementType type)
The type of placement.
|
public PlacementConstraint name(String name)
public String getName()
public void setName(String name)
public PlacementConstraint type(PlacementType type)
public PlacementType getType()
public void setType(PlacementType type)
public PlacementConstraint scope(PlacementScope scope)
public PlacementScope getScope()
public void setScope(PlacementScope scope)
public PlacementConstraint targetTags(List<String> targetTags)
public PlacementConstraint nodeAttributes(Map<String,List<String>> nodeAttributes)
public PlacementConstraint nodePartitions(List<String> nodePartitions)
public PlacementConstraint minCardinality(Long minCardinality)
public Long getMinCardinality()
public void setMinCardinality(Long minCardinality)
public PlacementConstraint maxCardinality(Long maxCardinality)
public Long getMaxCardinality()
public void setMaxCardinality(Long maxCardinality)
Copyright © 2023 Apache Software Foundation. All rights reserved.