Class CQuarantine
java.lang.Object
org.btrplace.scheduler.choco.constraint.CQuarantine
- All Implemented Interfaces:
ChocoConstraint
,Injectable
,MisplacedVMsEstimator
public class CQuarantine extends Object implements ChocoConstraint
Choco implementation of
Quarantine
.- Author:
- Fabien Hermenier
-
Constructor Summary
Constructors Constructor Description CQuarantine(Quarantine q)
Make a new constraint. -
Method Summary
Modifier and Type Method Description Set<VM>
getMisPlacedVMs(Instance i)
Get the VMs that are supposed to be mis-placed.boolean
inject(Parameters ps, ReconfigurationProblem rp)
Inject the constraint into the problem.String
toString()
-
Constructor Details
-
CQuarantine
Make a new constraint.- Parameters:
q
- the quarantine constraint to rely on
-
-
Method Details
-
inject
Description copied from interface:Injectable
Inject the constraint into the problem.- Specified by:
inject
in interfaceInjectable
- Parameters:
ps
- the scheduler parametersrp
- the problem- Returns:
true
if the injection succeeded,false
if the problem is sure to not have a solution- Throws:
SchedulerException
- if an error occurred while injecting.
-
getMisPlacedVMs
Description copied from interface:MisplacedVMsEstimator
Get the VMs that are supposed to be mis-placed.- Specified by:
getMisPlacedVMs
in interfaceMisplacedVMsEstimator
- Parameters:
i
- the instance to inspect- Returns:
- a set of VMs identifier that may be empty (when no VMs are misplaced)
-
toString
-