Class AssignDataCenterToTemplate
- java.lang.Object
-
- org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet
-
- org.jclouds.profitbricks.compute.strategy.AssignDataCenterToTemplate
-
- All Implemented Interfaces:
CreateNodesInGroupThenAddToSet
@Beta @Singleton public class AssignDataCenterToTemplate extends CreateNodesWithGroupEncodedIntoNameThenAddToSet
Attempts to find a valid datacenter in the configured location where the servers will be deployed. If no datacenter is found, one will be created.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet
CreateNodesWithGroupEncodedIntoNameThenAddToSet.AddNode
-
-
Field Summary
Fields Modifier and Type Field Description protected Logger
logger
-
Fields inherited from class org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet
addNodeWithGroupStrategy, customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory, listNodesStrategy, namingConvention, userExecutor
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AssignDataCenterToTemplate(CreateNodeWithGroupEncodedIntoName addNodeWithGroupStrategy, ListNodesStrategy listNodesStrategy, GroupNamingConvention.Factory namingConvention, com.google.common.util.concurrent.ListeningExecutorService userExecutor, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory, ProfitBricksApi api, com.google.common.base.Predicate<String> waitDcUntilAvailable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<?,com.google.common.util.concurrent.ListenableFuture<Void>>
execute(String group, int count, Template template, Set<NodeMetadata> goodNodes, Map<NodeMetadata,Exception> badNodes, com.google.common.collect.Multimap<NodeMetadata,CustomizationResponse> customizationResponses)
This implementation gets a list of acceptable node names to encode the group into, then it simultaneously runs the nodes and applies options to them.-
Methods inherited from class org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet
createNodeInGroupWithNameAndTemplate, getNextNames
-
-
-
-
Field Detail
-
logger
@Named("jclouds.compute") protected Logger logger
-
-
Constructor Detail
-
AssignDataCenterToTemplate
@Inject protected AssignDataCenterToTemplate(CreateNodeWithGroupEncodedIntoName addNodeWithGroupStrategy, ListNodesStrategy listNodesStrategy, GroupNamingConvention.Factory namingConvention, @Named("jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory, ProfitBricksApi api, @Named("jclouds.profitbricks.predicate.datacenter") com.google.common.base.Predicate<String> waitDcUntilAvailable)
-
-
Method Detail
-
execute
public Map<?,com.google.common.util.concurrent.ListenableFuture<Void>> execute(String group, int count, Template template, Set<NodeMetadata> goodNodes, Map<NodeMetadata,Exception> badNodes, com.google.common.collect.Multimap<NodeMetadata,CustomizationResponse> customizationResponses)
Description copied from class:CreateNodesWithGroupEncodedIntoNameThenAddToSet
This implementation gets a list of acceptable node names to encode the group into, then it simultaneously runs the nodes and applies options to them.- Specified by:
execute
in interfaceCreateNodesInGroupThenAddToSet
- Overrides:
execute
in classCreateNodesWithGroupEncodedIntoNameThenAddToSet
-
-