@Singleton public class CreateNodesWithGroupEncodedIntoNameThenAddToSet extends Object implements CreateNodesInGroupThenAddToSet
Modifier and Type | Field and Description |
---|---|
protected CreateNodeWithGroupEncodedIntoName |
addNodeWithGroupStrategy |
protected CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory |
customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory |
protected ExecutorService |
executor |
protected ListNodesStrategy |
listNodesStrategy |
protected Logger |
logger |
protected String |
nodeNamingConvention |
Modifier | Constructor and Description |
---|---|
protected |
CreateNodesWithGroupEncodedIntoNameThenAddToSet(CreateNodeWithGroupEncodedIntoName addNodeWithGroupStrategy,
ListNodesStrategy listNodesStrategy,
String nodeNamingConvention,
ExecutorService executor,
CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory) |
Modifier and Type | Method and Description |
---|---|
Map<?,Future<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.
|
protected String |
getNextName(String group,
Template template)
Get a name using a random mechanism that still ties all nodes in a group together.
|
protected Set<String> |
getNextNames(String group,
Template template,
int count)
Find the next node names that can be used.
|
protected final CreateNodeWithGroupEncodedIntoName addNodeWithGroupStrategy
protected final ListNodesStrategy listNodesStrategy
protected final String nodeNamingConvention
protected final ExecutorService executor
protected final CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory
@Inject protected CreateNodesWithGroupEncodedIntoNameThenAddToSet(CreateNodeWithGroupEncodedIntoName addNodeWithGroupStrategy, ListNodesStrategy listNodesStrategy, @Named(value="NAMING_CONVENTION") String nodeNamingConvention, @Named(value="jclouds.user-threads") ExecutorService executor, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.Factory customizeNodeAndAddToGoodMapOrPutExceptionIntoBadMapFactory)
public Map<?,Future<Void>> execute(String group, int count, Template template, Set<NodeMetadata> goodNodes, Map<NodeMetadata,Exception> badNodes, com.google.common.collect.Multimap<NodeMetadata,CustomizationResponse> customizationResponses)
execute
in interface CreateNodesInGroupThenAddToSet
protected Set<String> getNextNames(String group, Template template, int count)
group
- count
- template
- Copyright © 2009-2012 jclouds. All Rights Reserved.