public class CloudPod
extends java.lang.Object
Constructor and Description |
---|
CloudPod(CloudCluster cluster,
java.lang.String id,
int index)
Creates a new triad for the cluster.
|
Modifier and Type | Method and Description |
---|---|
void |
addServerListener(CloudServerListener listener)
Adds a listener to detect server add and removed.
|
CloudServer |
createDynamicServer(int index,
java.lang.String id,
java.lang.String displayId,
java.lang.String address,
int port,
boolean isSecure)
Creates a new dynamic server
|
CloudServer |
createDynamicServer(java.lang.String id,
java.lang.String address,
int port,
boolean isSecure)
Creates a new dynamic server
|
CloudServer |
createDynamicServer(java.lang.String id,
java.lang.String displayId,
java.lang.String address,
int port,
boolean isSecure)
Creates a new dynamic server
|
CloudServer |
createExternalStaticServer(java.lang.String id,
java.lang.String address,
int port,
boolean isSecure)
Creates a new externa static server
|
CloudServer |
createStaticServer(java.lang.String id,
java.lang.String address,
int port,
boolean isSecure)
Creates a new static server
|
CloudServer |
createStaticServer(java.lang.String id,
java.lang.String address,
int port,
boolean isSecure,
boolean isAllowExternal)
Creates a new static server
|
CloudServer |
findServer(int index)
Returns the pod with the given index.
|
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 address and port.
|
CloudServer |
findServerByDisplayId(java.lang.String id)
Finds the first server with the given server-id.
|
CloudServer |
findServerByUniqueClusterId(java.lang.String id)
Finds the first server with the given cluster id, the
three-digit base-64 identifier.
|
CloudCluster |
getCluster()
Returns the pod's cluster
|
<T> T |
getData(java.lang.Class<T> cl) |
java.lang.String |
getId()
Returns the pod id.
|
int |
getIndex()
Returns the pod index.
|
CloudServer |
getServer(int index) |
int |
getServerLength() |
CloudServer[] |
getServerList() |
CloudSystem |
getSystem()
Returns the pod's system
|
TriadDispatcher<CloudServer> |
getTriadServerDispatcher()
Returns the triad server dispatcher
|
boolean |
isPrimary()
Returns true if this is the main/primary pod.
|
boolean |
isSelf() |
void |
putData(java.lang.Object value) |
<T> T |
putDataIfAbsent(T value) |
CloudServer |
removeDynamicServer(int index) |
CloudServer |
removeDynamicServer(java.lang.String name) |
void |
removeServerListener(CloudServerListener listener)
Removes a listener to detect server add and removed.
|
java.lang.String |
toString() |
void |
updateServerState(CloudServer scalingServer) |
public CloudPod(CloudCluster cluster, java.lang.String id, int index)
cluster
- the owning clusterindex
- the triad indexpublic final java.lang.String getId()
public final int getIndex()
public final boolean isPrimary()
public final CloudCluster getCluster()
public final CloudSystem getSystem()
public final boolean isSelf()
public CloudServer getServer(int index)
public CloudServer[] getServerList()
public int getServerLength()
public CloudServer findServer(java.lang.String id)
public CloudServer findServerByDisplayId(java.lang.String id)
public CloudServer findServerByUniqueClusterId(java.lang.String id)
public CloudServer findServer(int index)
public CloudServer findServer(java.lang.String address, int port)
public void putData(java.lang.Object value)
public <T> T putDataIfAbsent(T value)
public <T> T getData(java.lang.Class<T> cl)
public void addServerListener(CloudServerListener listener)
public void removeServerListener(CloudServerListener listener)
public CloudServer createStaticServer(java.lang.String id, java.lang.String address, int port, boolean isSecure)
public CloudServer createStaticServer(java.lang.String id, java.lang.String address, int port, boolean isSecure, boolean isAllowExternal)
public CloudServer createExternalStaticServer(java.lang.String id, java.lang.String address, int port, boolean isSecure)
public CloudServer createDynamicServer(int index, java.lang.String id, java.lang.String displayId, java.lang.String address, int port, boolean isSecure)
public CloudServer createDynamicServer(java.lang.String id, java.lang.String displayId, java.lang.String address, int port, boolean isSecure)
public CloudServer createDynamicServer(java.lang.String id, java.lang.String address, int port, boolean isSecure)
public CloudServer removeDynamicServer(java.lang.String name)
public CloudServer removeDynamicServer(int index)
public void updateServerState(CloudServer scalingServer)
public TriadDispatcher<CloudServer> getTriadServerDispatcher()
public java.lang.String toString()
toString
in class java.lang.Object