public final class ClusterInitService extends Object
Constructor and Description |
---|
ClusterInitService() |
Modifier and Type | Method and Description |
---|---|
boolean |
isNativeTransportRunning(org.rhq.core.domain.cloud.StorageNode storageNode) |
boolean |
ping(List<org.rhq.core.domain.cloud.StorageNode> storageNodes,
int numHosts) |
void |
waitForClusterToStart(List<org.rhq.core.domain.cloud.StorageNode> storageNodes)
This method attempts to establish a Thrift RPC connection to each host.
|
void |
waitForClusterToStart(List<org.rhq.core.domain.cloud.StorageNode> storageNodes,
int numHosts,
int retries)
This method attempts to establish a Thrift RPC connection to each host for the
number specified.
|
void |
waitForClusterToStart(List<org.rhq.core.domain.cloud.StorageNode> storageNodes,
int numHosts,
long delay,
int retries,
int initialWait)
This method attempts to establish a Thrift RPC connection to each host for the
number specified.
|
void |
waitForSchemaAgreement(List<org.rhq.core.domain.cloud.StorageNode> storageNodes)
Waits for the cluster to reach schema agreement.
|
public boolean ping(List<org.rhq.core.domain.cloud.StorageNode> storageNodes, int numHosts)
public void waitForClusterToStart(List<org.rhq.core.domain.cloud.StorageNode> storageNodes)
waitForClusterToStart(java.util.List, int, int)
for details.hosts
- The cluster nodes to which a connection should be madepublic void waitForClusterToStart(List<org.rhq.core.domain.cloud.StorageNode> storageNodes, int numHosts, int retries)
numHosts
is 2, this method will block only until it can connect to two of the hosts. If the
connection fails, the host is retried after going through the other, remaining
hosts.
hosts
- The cluster nodes to which a connection should be madenumHosts
- The number of hosts to which a successful connection has to be made
before returning.retries
- The number of times to retry connecting. A runtime exception will be
thrown when the number of failed connections exceeds this value.public void waitForClusterToStart(List<org.rhq.core.domain.cloud.StorageNode> storageNodes, int numHosts, long delay, int retries, int initialWait)
numHosts
is 2, this method will block only until it can connect to two of the hosts. If the
connection fails, the host is retried after going through the other, remaining
hosts.
hosts
- The cluster nodes to which a connection should be madenumHosts
- The number of hosts to which a successful connection has to be made
before returning.delay
- The amount of time wait between attempts to make a connectionretries
- The number of times to retry connecting. A runtime exception will be
thrown when the number of failed connections exceeds this value.initialWait
- The amount of seconds before first try.public void waitForSchemaAgreement(List<org.rhq.core.domain.cloud.StorageNode> storageNodes) throws Exception
hosts
- The cluster nodesException
Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.