public class ReconfigurationPlanChecker extends Object implements ActionVisitor
SatConstraintChecker
.
In practice, the origin model is send to each of the checkers. Then it notifies all the checkers for the beginning and the end moment of each of the actions and events. Finally, it sends the resulting model to each of the checkers.
Actions start and end moment are notified in the increasing order of their associated moment with a priority given to the end moments.
Constructor and Description |
---|
ReconfigurationPlanChecker()
Make a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChecker(SatConstraintChecker<?> c)
Add an additional checker.
|
void |
check(ReconfigurationPlan p)
Check if a plan satisfies all the
SatConstraintChecker . |
boolean |
removeChecker(SatConstraintChecker<?> c)
Remove a checker.
|
SatConstraint |
visit(Allocate a)
Visit a
Allocate action. |
Object |
visit(AllocateEvent a)
Visit a
AllocateEvent event. |
SatConstraint |
visit(BootNode a)
Visit a
BootNode action. |
SatConstraint |
visit(BootVM a)
Visit a
BootVM action. |
SatConstraint |
visit(ForgeVM a)
Visit a
ForgeVM action. |
SatConstraint |
visit(KillVM a)
Visit a
KillVM action. |
SatConstraint |
visit(MigrateVM a)
Visit a
MigrateVM action. |
Object |
visit(ResumeVM a)
Visit a
ResumeVM action. |
Object |
visit(ShutdownNode a)
Visit a
ShutdownNode action. |
Object |
visit(ShutdownVM a)
Visit a
ShutdownVM action. |
SatConstraint |
visit(SubstitutedVMEvent a)
Visit a
SubstitutedVMEvent event. |
Object |
visit(SuspendVM a)
Visit a
SuspendVM action. |
public ReconfigurationPlanChecker()
public boolean addChecker(SatConstraintChecker<?> c)
c
- the checker to addtrue
iff the checker has been addedpublic boolean removeChecker(SatConstraintChecker<?> c)
c
- the checker to removetrue
iff the checker was presentpublic SatConstraint visit(Allocate a)
ActionVisitor
Allocate
action.visit
in interface ActionVisitor
a
- the action to visitpublic Object visit(AllocateEvent a)
ActionVisitor
AllocateEvent
event.visit
in interface ActionVisitor
a
- the event to visitpublic SatConstraint visit(SubstitutedVMEvent a)
ActionVisitor
SubstitutedVMEvent
event.visit
in interface ActionVisitor
a
- the event to visitpublic SatConstraint visit(BootNode a)
ActionVisitor
BootNode
action.visit
in interface ActionVisitor
a
- the action to visitpublic SatConstraint visit(BootVM a)
ActionVisitor
BootVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic SatConstraint visit(ForgeVM a)
ActionVisitor
ForgeVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic SatConstraint visit(KillVM a)
ActionVisitor
KillVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic SatConstraint visit(MigrateVM a)
ActionVisitor
MigrateVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic Object visit(ResumeVM a)
ActionVisitor
ResumeVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic Object visit(ShutdownNode a)
ActionVisitor
ShutdownNode
action.visit
in interface ActionVisitor
a
- the action to visitpublic Object visit(ShutdownVM a)
ActionVisitor
ShutdownVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic Object visit(SuspendVM a)
ActionVisitor
SuspendVM
action.visit
in interface ActionVisitor
a
- the action to visitpublic void check(ReconfigurationPlan p) throws ReconfigurationPlanCheckerException
SatConstraintChecker
.p
- the plan to checkReconfigurationPlanCheckerException
- if a violation is detectedCopyright © 2015 University of Nice-Sophia Antipolis. All Rights Reserved.