Class LonelySplitter
java.lang.Object
org.btrplace.scheduler.runner.disjoint.splitter.LonelySplitter
- All Implemented Interfaces:
ConstraintSplitter<Lonely>
public class LonelySplitter extends Object implements ConstraintSplitter<Lonely>
Splitter for
Lonely
constraints.
When the constraint focuses VMs among different partitions,
the constraint is split.
This operation is conservative wrt. the constraint semantic.
- Author:
- Fabien Hermenier
-
Constructor Summary
Constructors Constructor Description LonelySplitter()
-
Method Summary
Modifier and Type Method Description Class<Lonely>
getKey()
Get the class of the Constraint associated to the splitter.boolean
split(Lonely cstr, Instance origin, List<Instance> partitions, gnu.trove.map.hash.TIntIntHashMap vmsPosition, gnu.trove.map.hash.TIntIntHashMap nodePosition)
Ensure a given constraint fit into a single partition.
-
Constructor Details
-
LonelySplitter
public LonelySplitter()
-
-
Method Details
-
getKey
Description copied from interface:ConstraintSplitter
Get the class of the Constraint associated to the splitter.- Specified by:
getKey
in interfaceConstraintSplitter<Lonely>
- Returns:
- a Class derived from
Constraint
-
split
public boolean split(Lonely cstr, Instance origin, List<Instance> partitions, gnu.trove.map.hash.TIntIntHashMap vmsPosition, gnu.trove.map.hash.TIntIntHashMap nodePosition)Description copied from interface:ConstraintSplitter
Ensure a given constraint fit into a single partition. If necessary, the constraint may have be split. this call inserts the constrain (or its subdivisions) inside their respective instances- Specified by:
split
in interfaceConstraintSplitter<Lonely>
- Parameters:
cstr
- the model constraintorigin
- the original instance to splitpartitions
- the possible partitions @returnfalse
iff this leads to a problem without solutions.vmsPosition
- the partition associated to each VMnodePosition
- the partition associated to each node- Returns:
true
iff the split was successful.false
otherwise
-