public class RunningCapacity extends SatConstraint
The restriction provided by the constraint can be either discrete or continuous. If it is discrete, the constraint only considers the model obtained as the end of the reconfiguration process.
If the restriction is continuous, then the total usage must never exceed the given amount, in the source model, during the reconfiguration and at the end.
Constructor and Description |
---|
RunningCapacity(Node n,
int amount)
Make a new discrete constraint on a single node
|
RunningCapacity(Node n,
int amount,
boolean continuous)
Make a new constraint on a single node
|
RunningCapacity(Set<Node> nodes,
int amount)
Make a new constraint having a discrete restriction.
|
RunningCapacity(Set<Node> nodes,
int amount,
boolean continuous)
Make a new constraint.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getAmount()
Get the amount of resources
|
SatConstraintChecker<RunningCapacity> |
getChecker()
Get the validator used to check if a plan satisfies the constraint.
|
int |
hashCode() |
String |
toString() |
getInvolvedNodes, getInvolvedVMs, isContinuous, isSatisfied, isSatisfied, restrictionToString, setContinuous
public RunningCapacity(Node n, int amount)
n
- the node involved in the constraintamount
- the maximum amount running VMs running on the given node. >= 0public RunningCapacity(Node n, int amount, boolean continuous)
n
- the node involved in the constraintamount
- the maximum amount running VMs running on the given node. >= 0continuous
- true
for a continuous restrictionpublic RunningCapacity(Set<Node> nodes, int amount)
nodes
- the nodes involved in the constraintamount
- the maximum amount running VMs running on the given nodes. >= 0public boolean equals(Object o)
equals
in class SatConstraint
public int getAmount()
public int hashCode()
hashCode
in class SatConstraint
public SatConstraintChecker<RunningCapacity> getChecker()
SatConstraint
getChecker
in class SatConstraint
SatConstraintChecker
Copyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.