made cloning single threaded

This commit is contained in:
David Ribeiro Alves 2012-03-12 10:59:28 +00:00
parent be2177b167
commit 1f17f07e97
3 changed files with 1 additions and 6 deletions

View File

@ -27,8 +27,6 @@ import org.jclouds.byon.Node;
import org.jclouds.byon.config.CacheNodeStoreModule;
import org.jclouds.compute.StandaloneComputeServiceContextBuilder;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.concurrent.MoreExecutors;
import org.jclouds.concurrent.config.ExecutorServiceModule;
import org.jclouds.virtualbox.config.VirtualBoxComputeServiceContextModule;
import com.google.common.base.Predicate;

View File

@ -33,7 +33,6 @@ import javax.inject.Singleton;
import org.eclipse.jetty.server.Server;
import org.jclouds.byon.Node;
import org.jclouds.byon.config.CacheNodeStoreModule;
import org.jclouds.byon.functions.NodeToNodeMetadata;
import org.jclouds.byon.suppliers.SupplyFromProviderURIOrNodesProperty;
import org.jclouds.compute.ComputeServiceAdapter;
@ -49,7 +48,6 @@ import org.jclouds.compute.domain.NodeState;
import org.jclouds.compute.domain.OsFamily;
import org.jclouds.compute.domain.TemplateBuilder;
import org.jclouds.compute.reference.ComputeServiceConstants.Timeouts;
import org.jclouds.concurrent.SingleThreaded;
import org.jclouds.domain.Location;
import org.jclouds.functions.IdentityFunction;
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
@ -105,7 +103,6 @@ import com.google.inject.TypeLiteral;
* @author Mattias Holmqvist, Andrea Turli
*/
@SuppressWarnings({ "unchecked", "rawtypes" })
@SingleThreaded
public class VirtualBoxComputeServiceContextModule extends
ComputeServiceAdapterContextModule<Supplier, Supplier, IMachine, IMachine, Image, Location> {

View File

@ -88,7 +88,7 @@ public class CloneAndRegisterMachineFromIMachineIfNotAlreadyExists implements Fu
|| e.getMessage().contains("Could not find a registered machine with UUID {");
}
private IMachine cloneMachine(CloneSpec cloneSpec) {
private synchronized IMachine cloneMachine(CloneSpec cloneSpec) {
VmSpec vmSpec = cloneSpec.getVmSpec();
NetworkSpec networkSpec = cloneSpec.getNetworkSpec();
boolean isLinkedClone = cloneSpec.isLinked();