Package org.btrplace.plan
Interface ReconfigurationPlanMonitor
- All Known Implementing Classes:
DefaultReconfigurationPlanMonitor
public interface ReconfigurationPlanMonitor
This allows to monitor the execution of a reconfiguration plan while
considering the dependencies between the actions that are established
in a
ReconfigurationPlan
.
With regards to the actions that have already been executed, it is possible to get the actions that can be safely executed.
- Author:
- Fabien Hermenier
-
Method Summary
Modifier and Type Method Description Set<Action>
commit(Action a)
Commit an action that was applyable.Model
getCurrentModel()
Get the current model.int
getNbCommitted()
Get the number of actions that have been committed.ReconfigurationPlan
getReconfigurationPlan()
Get the plan associated to the monitor.boolean
isBlocked(Action a)
Check if an action is blocked.
-
Method Details
-
getCurrentModel
Model getCurrentModel()Get the current model.- Returns:
- a model
-
commit
Commit an action that was applyable. If it is theoretically possible to execute the action on the current model, the model is updated accordingly.- Parameters:
a
- the action to commit- Returns:
- a set of unblocked actions that may be empty if the operation succeed.
- Throws:
InfeasibleActionException
- if the action was not applyable.
-
getNbCommitted
int getNbCommitted()Get the number of actions that have been committed.- Returns:
- a number between 0 and
ReconfigurationPlan.getSize()
-
isBlocked
Check if an action is blocked.- Parameters:
a
- the action to check- Returns:
true
iff the action is blocked
-
getReconfigurationPlan
ReconfigurationPlan getReconfigurationPlan()Get the plan associated to the monitor.- Returns:
- a non-null plan
-