org.jclouds.virtualbox.functions
Class NodeCreator

java.lang.Object
  extended by org.jclouds.virtualbox.functions.NodeCreator
All Implemented Interfaces:
com.google.common.base.Function<NodeSpec,ComputeServiceAdapter.NodeAndInitialCredentials<org.virtualbox_4_1.IMachine>>

@Singleton
public class NodeCreator
extends Object
implements com.google.common.base.Function<NodeSpec,ComputeServiceAdapter.NodeAndInitialCredentials<org.virtualbox_4_1.IMachine>>

Creates nodes, by cloning a master vm and based on the provided NodeSpec. Must be synchronized mainly because of snapshot creation (must be synchronized on a per-master-basis).

Author:
David Alves, Andrea Turli

Constructor Summary
NodeCreator(com.google.common.base.Supplier<org.virtualbox_4_1.VirtualBoxManager> manager, com.google.common.base.Function<CloneSpec,org.virtualbox_4_1.IMachine> cloner, RunScriptOnNode.Factory runScriptOnNodeFactory, com.google.common.base.Supplier<NodeMetadata> host, MachineUtils machineUtils, RunScriptOnNode.Factory scriptRunnerFactory, MachineController machineController)
           
 
Method Summary
 ComputeServiceAdapter.NodeAndInitialCredentials<org.virtualbox_4_1.IMachine> apply(NodeSpec nodeSpec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

NodeCreator

@Inject
public NodeCreator(com.google.common.base.Supplier<org.virtualbox_4_1.VirtualBoxManager> manager,
                          com.google.common.base.Function<CloneSpec,org.virtualbox_4_1.IMachine> cloner,
                          RunScriptOnNode.Factory runScriptOnNodeFactory,
                          com.google.common.base.Supplier<NodeMetadata> host,
                          MachineUtils machineUtils,
                          RunScriptOnNode.Factory scriptRunnerFactory,
                          MachineController machineController)
Method Detail

apply

public ComputeServiceAdapter.NodeAndInitialCredentials<org.virtualbox_4_1.IMachine> apply(NodeSpec nodeSpec)
Specified by:
apply in interface com.google.common.base.Function<NodeSpec,ComputeServiceAdapter.NodeAndInitialCredentials<org.virtualbox_4_1.IMachine>>


Copyright © 2009-2012 jclouds. All Rights Reserved.