public class Among extends SatConstraint
When the restriction is discrete, the constraint only ensure that the VMs are not spread over several group of nodes at the end of the reconfiguration process. However, this situation may occur temporary during the reconfiguration. Basically, this allows to select a new group of nodes for the VMs.
When the restriction is continuous, if some VMs are already running, on a group of nodes, it will not be possible to relocated the VMs to a new group of nodes.
Constructor and Description |
---|
Among(Collection<VM> vms,
Collection<Collection<Node>> parts)
Make a new constraint with a discrete restriction.
|
Among(Collection<VM> vms,
Collection<Collection<Node>> parts,
boolean continuous)
Make a new constraint.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Collection<Node> |
getAssociatedPGroup(Node u)
Get the group of nodes that contains the given node.
|
SatConstraintChecker<Among> |
getChecker()
Get the validator used to check if a plan satisfies the constraint.
|
Collection<Collection<Node>> |
getGroupsOfNodes()
Get the groups of nodes identifiers
|
Collection<Node> |
getInvolvedNodes()
Get the nodes involved in the constraint.
|
int |
hashCode() |
String |
toString() |
getInvolvedVMs, isContinuous, isSatisfied, isSatisfied, restrictionToString, setContinuous
public Among(Collection<VM> vms, Collection<Collection<Node>> parts)
vms
- the group of VMsparts
- disjoint set of nodespublic Among(Collection<VM> vms, Collection<Collection<Node>> parts, boolean continuous)
vms
- the group of VMsparts
- disjoint set of nodescontinuous
- true
for a continuous restrictionpublic Collection<Node> getAssociatedPGroup(Node u)
u
- the node identifiernull
otherwisepublic Collection<Node> getInvolvedNodes()
SatConstraint
getInvolvedNodes
in class SatConstraint
public Collection<Collection<Node>> getGroupsOfNodes()
public boolean equals(Object o)
equals
in class SatConstraint
public int hashCode()
hashCode
in class SatConstraint
public SatConstraintChecker<Among> getChecker()
SatConstraint
getChecker
in class SatConstraint
SatConstraintChecker
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.