public class CloudSystem
extends java.lang.Object
Constructor and Description |
---|
CloudSystem(java.lang.String id)
Creates a CloudDomain with an identifying id.
|
Modifier and Type | Method and Description |
---|---|
void |
addClusterListener(CloudClusterListener listener)
Adds a listener to detect server add and removed.
|
CloudCluster |
createCluster(java.lang.String id)
Creates a new cluster.
|
CloudCluster |
findCluster(java.lang.String id)
Finds the server with the unique id.
|
CloudServer |
findServer(java.lang.String id)
Finds the server with the unique id.
|
CloudServer |
findServer(java.lang.String address,
int port)
Finds the first server with the given address and port
|
CloudServer |
findServer(java.lang.String clusterId,
int podIndex,
int serverIndex)
Finds the server with the unique id.
|
CloudCluster[] |
getClusterList()
Return the clusters in the cloud.
|
java.lang.String |
getId()
Returns the server id.
|
boolean |
removeCluster(java.lang.String id)
Creates a new cluster.
|
void |
removeClusterListener(CloudClusterListener listener)
Removes a listener to detect server add and removed.
|
void |
start() |
java.lang.String |
toString() |
public CloudSystem(java.lang.String id)
public java.lang.String getId()
public CloudCluster[] getClusterList()
public CloudCluster findCluster(java.lang.String id)
public CloudServer findServer(java.lang.String id)
public CloudServer findServer(java.lang.String clusterId, int podIndex, int serverIndex)
public CloudServer findServer(java.lang.String address, int port)
public CloudCluster createCluster(java.lang.String id)
public boolean removeCluster(java.lang.String id)
public void addClusterListener(CloudClusterListener listener)
public void removeClusterListener(CloudClusterListener listener)
public void start()
public java.lang.String toString()
toString
in class java.lang.Object