Search in sources :

Example 1 with NodeTransitionBuilder

use of org.btrplace.scheduler.choco.transition.NodeTransitionBuilder in project scheduler by btrplace.

the class DefaultReconfigurationProblem method makeNodeTransitions.

private void makeNodeTransitions() {
    Mapping m = model.getMapping();
    nodeActions = new ArrayList<>(nodes.size());
    for (Node nId : nodes) {
        NodeState state = m.getState(nId);
        NodeTransitionBuilder b = amFactory.getBuilder(state);
        if (b == null) {
            throw new LifeCycleViolationException(model, nId, state, EnumSet.of(NodeState.OFFLINE, NodeState.ONLINE));
        }
        nodeActions.add(b.build(this, nId));
    }
}
Also used : NodeState(org.btrplace.model.NodeState) NodeTransitionBuilder(org.btrplace.scheduler.choco.transition.NodeTransitionBuilder) Node(org.btrplace.model.Node) Mapping(org.btrplace.model.Mapping)

Aggregations

Mapping (org.btrplace.model.Mapping)1 Node (org.btrplace.model.Node)1 NodeState (org.btrplace.model.NodeState)1 NodeTransitionBuilder (org.btrplace.scheduler.choco.transition.NodeTransitionBuilder)1