Package org.btrplace.plan.event
Class ForgeVM
java.lang.Object
org.btrplace.plan.event.Action
org.btrplace.plan.event.ForgeVM
- All Implemented Interfaces:
Event
,VMEvent
,VMStateTransition
public class ForgeVM extends Action implements VMStateTransition
Prepare a VM for being deployed.
- Author:
- Fabien Hermenier
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
applyAction(Model m)
Put the VM in the ready state iff it does not already belong to the mapping.boolean
equals(Object o)
Test if the action is equals to another object.VMState
getCurrentState()
Get the current state of the VM.VMState
getNextState()
Get the next state of the VM.VM
getVM()
Get the VM to involved in the action.int
hashCode()
String
pretty()
Pretty print of the action.Object
visit(ActionVisitor v)
Notify a visitor to visit the action.Methods inherited from class org.btrplace.plan.event.Action
addEvent, apply, applyEvents, getEnd, getEvents, getStart, toString
-
Constructor Details
-
ForgeVM
Make a new action.- Parameters:
vm
- the VM to forge.start
- the moment the action startsend
- the moment the action ends
-
-
Method Details
-
applyAction
Put the VM in the ready state iff it does not already belong to the mapping.- Specified by:
applyAction
in classAction
- Parameters:
m
- the model to modify- Returns:
true
iff successful
-
equals
Test if the action is equals to another object. -
hashCode
public int hashCode() -
getVM
Description copied from interface:VMEvent
Get the VM to involved in the action. -
pretty
Description copied from class:Action
Pretty print of the action. -
getCurrentState
Description copied from interface:VMStateTransition
Get the current state of the VM.- Specified by:
getCurrentState
in interfaceVMStateTransition
- Returns:
- a State
-
getNextState
Description copied from interface:VMStateTransition
Get the next state of the VM.- Specified by:
getNextState
in interfaceVMStateTransition
- Returns:
- a State
-
visit
Description copied from interface:Event
Notify a visitor to visit the action.
-