public class Preserve extends SatConstraint
The restriction provided by the constraint is discrete.
Constructor and Description |
---|
Preserve(VM vm,
String r,
int q)
Make a new constraint.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getAmount()
Get the amount of resources.
|
SatConstraintChecker<Preserve> |
getChecker()
Get the validator used to check if a plan satisfies the constraint.
|
String |
getResource()
Get the resource identifier.
|
int |
hashCode() |
static List<Preserve> |
newPreserve(Collection<VM> vms,
String r,
int q)
Make multiple constraints
|
boolean |
setContinuous(boolean b)
Indicates if the restriction provided by the constraint is continuous.
|
String |
toString() |
getInvolvedNodes, getInvolvedVMs, isContinuous, isSatisfied, isSatisfied, restrictionToString
public static List<Preserve> newPreserve(Collection<VM> vms, String r, int q)
vms
- the VMs involved in the constraintsr
- the resource identifierq
- the the minimum amount of resources to allocate to each VM. >= 0public String getResource()
public int getAmount()
public boolean equals(Object o)
equals
in class SatConstraint
public int hashCode()
hashCode
in class SatConstraint
public boolean setContinuous(boolean b)
SatConstraint
setContinuous
in class SatConstraint
b
- true
to ask for a continuous satisfaction, false
for a discrete satisfaction.true
iff the parameter has been consideredpublic SatConstraintChecker<Preserve> getChecker()
SatConstraint
getChecker
in class SatConstraint
SatConstraintChecker
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.