|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.whirr.ClusterController
public class ClusterController
This class is used to start and stop clusters.
Constructor Summary | |
---|---|
ClusterController()
|
|
ClusterController(com.google.common.base.Function<ClusterSpec,org.jclouds.compute.ComputeServiceContext> getCompute,
ClusterStateStoreFactory stateStoreFactory)
|
Method Summary | |
---|---|
void |
destroyCluster(ClusterSpec clusterSpec)
Stop the cluster and destroy all resources associated with it. |
void |
destroyInstance(ClusterSpec clusterSpec,
String instanceId)
|
protected com.google.common.base.Function<ClusterSpec,org.jclouds.compute.ComputeServiceContext> |
getCompute()
|
Set<Cluster.Instance> |
getInstances(ClusterSpec spec)
|
Set<Cluster.Instance> |
getInstances(ClusterSpec spec,
ClusterStateStore stateStore)
|
String |
getName()
|
Set<? extends org.jclouds.compute.domain.NodeMetadata> |
getNodes(ClusterSpec clusterSpec)
Deprecated. |
Cluster |
launchCluster(ClusterSpec clusterSpec)
Start the cluster described by clusterSpec and block until the
cluster is
available. |
static com.google.common.base.Predicate<org.jclouds.compute.domain.ComputeMetadata> |
runningInGroup(String group)
|
Map<? extends org.jclouds.compute.domain.NodeMetadata,org.jclouds.compute.domain.ExecResponse> |
runScriptOnNodesMatching(ClusterSpec spec,
com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> condition,
org.jclouds.scriptbuilder.domain.Statement statement)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterController()
public ClusterController(com.google.common.base.Function<ClusterSpec,org.jclouds.compute.ComputeServiceContext> getCompute, ClusterStateStoreFactory stateStoreFactory)
Method Detail |
---|
public String getName()
protected com.google.common.base.Function<ClusterSpec,org.jclouds.compute.ComputeServiceContext> getCompute()
public Cluster launchCluster(ClusterSpec clusterSpec) throws IOException, InterruptedException
clusterSpec
and block until the
cluster is
available. It is not guaranteed that the service running on the cluster
has started when this method returns.
clusterSpec
-
IOException
- if there is a problem while starting the cluster. The
cluster may or may not have started.
InterruptedException
- if the thread is interrupted.public void destroyCluster(ClusterSpec clusterSpec) throws IOException, InterruptedException
IOException
- if there is a problem while stopping the cluster. The
cluster may or may not have been stopped.
InterruptedException
- if the thread is interrupted.public void destroyInstance(ClusterSpec clusterSpec, String instanceId) throws IOException
IOException
public Map<? extends org.jclouds.compute.domain.NodeMetadata,org.jclouds.compute.domain.ExecResponse> runScriptOnNodesMatching(ClusterSpec spec, com.google.common.base.Predicate<org.jclouds.compute.domain.NodeMetadata> condition, org.jclouds.scriptbuilder.domain.Statement statement) throws IOException, org.jclouds.compute.RunScriptOnNodesException
IOException
org.jclouds.compute.RunScriptOnNodesException
@Deprecated public Set<? extends org.jclouds.compute.domain.NodeMetadata> getNodes(ClusterSpec clusterSpec) throws IOException, InterruptedException
IOException
InterruptedException
public Set<Cluster.Instance> getInstances(ClusterSpec spec) throws IOException, InterruptedException
IOException
InterruptedException
public Set<Cluster.Instance> getInstances(ClusterSpec spec, ClusterStateStore stateStore) throws IOException, InterruptedException
IOException
InterruptedException
public static com.google.common.base.Predicate<org.jclouds.compute.domain.ComputeMetadata> runningInGroup(String group)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |