public class SplitAmong extends SatConstraint
The set of VMs must be disjoint so must be the set of servers.
If the constraint is set to provide a discrete restriction, it only ensures no group of VMs share a group of nodes while each group of VMs does not spread over several group of nodes. This allows to change the group of nodes hosting the group of VMs during the reconfiguration process.
If the constraint is set to provide a continuous restriction, the constraint must be satisfied initially, then the VMs of a single group can never spread on multiple groups of nodes nor change of group.
Constructor and Description |
---|
SplitAmong(Collection<Collection<VM>> vParts,
Collection<Collection<Node>> pParts)
Make a new constraint having a discrete restriction.
|
SplitAmong(Collection<Collection<VM>> vParts,
Collection<Collection<Node>> pParts,
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 associated to a given node.
|
Collection<VM> |
getAssociatedVGroup(VM u)
Get the group of VMs associated to a given VM.
|
SatConstraintChecker<SplitAmong> |
getChecker()
Get the validator used to check if a plan satisfies the constraint.
|
Collection<Collection<Node>> |
getGroupsOfNodes()
Get the groups of nodes identifiers
|
Collection<Collection<VM>> |
getGroupsOfVMs()
Get the groups of VMs identifiers
|
Set<Node> |
getInvolvedNodes()
Get the nodes involved in the constraint.
|
Set<VM> |
getInvolvedVMs()
Get the VMs involved in the constraint.
|
int |
hashCode() |
String |
toString() |
isContinuous, isSatisfied, isSatisfied, restrictionToString, setContinuous
public SplitAmong(Collection<Collection<VM>> vParts, Collection<Collection<Node>> pParts)
vParts
- the disjoint sets of VMspParts
- the disjoint sets of nodes.public SplitAmong(Collection<Collection<VM>> vParts, Collection<Collection<Node>> pParts, boolean continuous)
vParts
- the disjoint sets of VMspParts
- the disjoint sets of nodes.continuous
- true
for a continuous restrictionpublic Set<VM> getInvolvedVMs()
SatConstraint
getInvolvedVMs
in class SatConstraint
public Set<Node> getInvolvedNodes()
SatConstraint
getInvolvedNodes
in class SatConstraint
public Collection<Collection<VM>> getGroupsOfVMs()
public Collection<Collection<Node>> getGroupsOfNodes()
public Collection<Node> getAssociatedPGroup(Node u)
u
- the nodenull
otherwisepublic Collection<VM> getAssociatedVGroup(VM u)
u
- the VMnull
otherwisepublic boolean equals(Object o)
equals
in class SatConstraint
public int hashCode()
hashCode
in class SatConstraint
public SatConstraintChecker<SplitAmong> getChecker()
SatConstraint
getChecker
in class SatConstraint
SatConstraintChecker
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.