Package org.btrplace.model
Interface ElementBuilder
- All Superinterfaces:
Copyable<ElementBuilder>
- All Known Subinterfaces:
Model
- All Known Implementing Classes:
DefaultElementBuilder
,DefaultModel
,SubModel
,SynchronizedElementBuilder
public interface ElementBuilder extends Copyable<ElementBuilder>
Interface to specify a builder to create node or VMs.
Each created element is guarantee for being unique wrt. all the
created element with the same type.
- Author:
- Fabien Hermenier
-
Method Summary
Modifier and Type Method Description boolean
contains(Node n)
Check if a given node has been defined for this model.boolean
contains(VM v)
Check if a given VM has been defined for this model.Node
newNode()
Generate a new Node for this model.Node
newNode(int id)
Generate a new node for this model.VM
newVM()
Generate a new VM.VM
newVM(int id)
Generate a new VM.
-
Method Details
-
newVM
VM newVM()Generate a new VM.- Returns:
null
if no identifiers are available for the VM.
-
newVM
Generate a new VM.- Parameters:
id
- the identifier to use for that VM- Returns:
- a VM or
null
if the identifier is already used
-
newNode
Node newNode()Generate a new Node for this model. The node will not be included in the mapping associated to the model.- Returns:
null
if no identifiers are available for the Node.
-
newNode
Generate a new node for this model. The node will not be included in the mapping associated to the model.- Parameters:
id
- the identifier to use for that node- Returns:
- a Node or
null
if the identifier is already used
-
contains
Check if a given VM has been defined for this model.- Parameters:
v
- the VM to check- Returns:
true
iff the VM is already defined
-
contains
Check if a given node has been defined for this model.- Parameters:
n
- the node to check- Returns:
true
iff the VM is booked
-