com.caucho.cloud.topology
Class CloudCluster

java.lang.Object
  extended by com.caucho.cloud.topology.CloudCluster

public class CloudCluster
extends java.lang.Object

Defines a set of clustered servers.


Method Summary
 void addPodListener(CloudPodListener listener)
          Adds a listener to detect pod add and remove.
 CloudPod createPod()
          Creates a new pod
 CloudPod createPod(int index)
          Creates a new pod
 CloudPod findPod(int podIndex)
          Returns the pod with the given index.
 CloudPod findPod(java.lang.String id)
          Returns the pod with the given index.
 CloudServer findServer(int podIndex, int index)
          Finds the first server with the given server-id.
 CloudServer findServer(java.lang.String id)
          Finds the first server with the given server-id.
 CloudServer findServer(java.lang.String address, int port)
          Finds the first server with the given server-id.
 CloudServer findServerByUniqueClusterId(java.lang.String id)
          Finds the first server with the given server-id.
 ClusterMXBean getAdmin()
           
<T> T
getData(java.lang.Class<T> cl)
           
 java.lang.String getId()
          Gets the cluster id.
 CloudPod[] getPodList()
          Returns the list of pods for the cluster
 CloudSystem getSystem()
          Returns the owning domain.
 void putData(java.lang.Object value)
           
<T> T
putDataIfAbsent(T value)
           
 boolean removePod(int index)
          Creates a new cluster.
 void removePodListener(CloudPodListener listener)
          Removes a listener to detect pod add and remove.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public java.lang.String getId()
Gets the cluster id.


getSystem

public CloudSystem getSystem()
Returns the owning domain.


getPodList

public CloudPod[] getPodList()
Returns the list of pods for the cluster


getAdmin

public ClusterMXBean getAdmin()

findServer

public CloudServer findServer(java.lang.String id)
Finds the first server with the given server-id.


findServerByUniqueClusterId

public CloudServer findServerByUniqueClusterId(java.lang.String id)
Finds the first server with the given server-id.


findServer

public CloudServer findServer(int podIndex,
                              int index)
Finds the first server with the given server-id.


findPod

public CloudPod findPod(int podIndex)
Returns the pod with the given index.


findPod

public CloudPod findPod(java.lang.String id)
Returns the pod with the given index.


createPod

public CloudPod createPod()
Creates a new pod


createPod

public CloudPod createPod(int index)
Creates a new pod


removePod

public boolean removePod(int index)
Creates a new cluster.


findServer

public CloudServer findServer(java.lang.String address,
                              int port)
Finds the first server with the given server-id.


putData

public void putData(java.lang.Object value)

putDataIfAbsent

public <T> T putDataIfAbsent(T value)

getData

public <T> T getData(java.lang.Class<T> cl)

addPodListener

public void addPodListener(CloudPodListener listener)
Adds a listener to detect pod add and remove.


removePodListener

public void removePodListener(CloudPodListener listener)
Removes a listener to detect pod add and remove.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object