public class Split extends SatConstraint
When the restriction is discrete, the constraint ensures there is no co-location on only on a given model.
When the restriction is continuous, the constraint ensures a VM can not be set running on a node that is hosting VMs from another group, even temporary.
Constructor and Description |
---|
Split(Collection<Collection<VM>> parts)
Make a new constraint having a discrete restriction.
|
Split(Collection<Collection<VM>> parts,
boolean continuous)
Make a new constraint.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Collection<VM> |
getAssociatedVGroup(VM u)
Get the group of VMs that contains the given VM.
|
SatConstraintChecker<Split> |
getChecker()
Get the validator used to check if a plan satisfies the constraint.
|
Set<VM> |
getInvolvedVMs()
Get the VMs involved in the constraint.
|
Collection<Collection<VM>> |
getSets()
Get the groups of VMs identifier.
|
int |
hashCode() |
String |
toString() |
getInvolvedNodes, isContinuous, isSatisfied, isSatisfied, restrictionToString, setContinuous
public Split(Collection<Collection<VM>> parts)
parts
- the disjoint sets of VMs that must be splitpublic Split(Collection<Collection<VM>> parts, boolean continuous)
parts
- the disjoint sets of VMs that must be splitcontinuous
- true
for a continuous restrictionpublic Set<VM> getInvolvedVMs()
SatConstraint
getInvolvedVMs
in class SatConstraint
public Collection<Collection<VM>> getSets()
public Collection<VM> getAssociatedVGroup(VM u)
u
- the VM identifiernull
otherwisepublic boolean equals(Object o)
equals
in class SatConstraint
public int hashCode()
hashCode
in class SatConstraint
public SatConstraintChecker<Split> getChecker()
SatConstraint
getChecker
in class SatConstraint
SatConstraintChecker
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.