com.caucho.cloud.network
Class ClusterServerAdmin

java.lang.Object
  extended by com.caucho.management.server.AbstractManagedObject
      extended by com.caucho.cloud.network.ClusterServerAdmin
All Implemented Interfaces:
ClusterServerMXBean, ManagedObjectMXBean

public class ClusterServerAdmin
extends AbstractManagedObject
implements ClusterServerMXBean

Implementation of the ClusterServer's administration mbean.


Constructor Summary
ClusterServerAdmin(ClusterServer server)
           
 
Method Summary
 void enableSessionOnly()
          Enables connections to the target server.
 java.lang.String getAddress()
          Returns the server's IP address.
 ClusterMXBean getCluster()
          Returns the owning cluster's object name.
 long getClusterIdleTime()
          Returns the socket timeout for a client.
 int getClusterIndex()
          Returns the cluster index.
 java.lang.String getClusterState()
          Returns the lifecycle state as a cluster server.
 int getConnectionActiveCount()
          Returns the number of connections actively being used to communicate with the target server.
 long getConnectionBusyCountTotal()
          Returns the number of connections which resulted in a busy response.
 long getConnectionFailCountTotal()
          Returns the number of connections which could not connect to the target server.
 int getConnectionIdleCount()
          Returns the number of open but currently unused connections to the target server.
 long getConnectionKeepaliveCountTotal()
          Returns the number of connections that have been made to the target server.
 int getConnectionMin()
          Returns the green load-balancing connection minimum
 long getConnectionNewCountTotal()
          Returns the number of connections that have been made to the target server.
 long getConnectTimeout()
          Returns the connect timeout for a client.
 long getIdleTime()
          Returns the maximum time a socket can remain idle in the pool.
 java.util.Date getLastBusyTime()
          Returns the last time of the busy response.
 java.util.Date getLastFailTime()
          Returns the time of the last failure.
 java.util.Date getLastHeartbeatTime()
           
 java.util.Date getLastSuccessTime()
           
 double getLatencyFactor()
          Returns the server's latency factory
 java.lang.String getLoadBalanceState()
          Returns the load balance state.
 java.lang.String getName()
          Returns the -server id.
 int getPort()
          Returns the server's port.
 long getRecoverTime()
          Returns the time the client will consider the connection dead before retrying.
 double getServerCpuLoadAvg()
          Returns the server's load average.
 long getSocketTimeout()
          Returns the socket timeout for a client.
 java.lang.String getType()
          The JMX type of this MBean, defaults to the prefix of the FooMXBean..
 long getWarmupTime()
          Returns the warmup time in milliseconds.
 int getWeight()
          Returns the load-balance weight.
 boolean isDynamicServer()
          Returns true for a dynamic server
 boolean isHeartbeatActive()
           
 boolean isSelfServer()
          Returns true for the self server
 boolean isTriadServer()
          Returns true for a triad server
 boolean ping()
          Returns true if a connection can be made to the target server.
protected  void register()
           
 void removeDynamicServer()
          Remove the server as a dynamic server
 void start()
          Enables connections to the target server.
 void stop()
          Disables connections to the target server.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.management.server.AbstractManagedObject
addObjectNameProperties, getObjectName, registerSelf, unregisterSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.management.server.ManagedObjectMXBean
getObjectName
 

Constructor Detail

ClusterServerAdmin

public ClusterServerAdmin(ClusterServer server)
Method Detail

getName

public java.lang.String getName()
Returns the -server id.

Specified by:
getName in interface ManagedObjectMXBean
Specified by:
getName in class AbstractManagedObject

getType

public java.lang.String getType()
Description copied from class: AbstractManagedObject
The JMX type of this MBean, defaults to the prefix of the FooMXBean..

Specified by:
getType in interface ManagedObjectMXBean
Overrides:
getType in class AbstractManagedObject

getCluster

public ClusterMXBean getCluster()
Returns the owning cluster's object name.

Specified by:
getCluster in interface ClusterServerMXBean

getClusterIndex

public int getClusterIndex()
Returns the cluster index.

Specified by:
getClusterIndex in interface ClusterServerMXBean

getAddress

public java.lang.String getAddress()
Returns the server's IP address.

Specified by:
getAddress in interface ClusterServerMXBean

getPort

public int getPort()
Returns the server's port.

Specified by:
getPort in interface ClusterServerMXBean

isDynamicServer

public boolean isDynamicServer()
Returns true for a dynamic server

Specified by:
isDynamicServer in interface ClusterServerMXBean

isTriadServer

public boolean isTriadServer()
Returns true for a triad server

Specified by:
isTriadServer in interface ClusterServerMXBean

isSelfServer

public boolean isSelfServer()
Returns true for the self server

Specified by:
isSelfServer in interface ClusterServerMXBean

getRecoverTime

public long getRecoverTime()
Returns the time the client will consider the connection dead before retrying.

Specified by:
getRecoverTime in interface ClusterServerMXBean

getIdleTime

public long getIdleTime()
Returns the maximum time a socket can remain idle in the pool.

Specified by:
getIdleTime in interface ClusterServerMXBean

getConnectionMin

public int getConnectionMin()
Returns the green load-balancing connection minimum

Specified by:
getConnectionMin in interface ClusterServerMXBean

getConnectTimeout

public long getConnectTimeout()
Returns the connect timeout for a client.

Specified by:
getConnectTimeout in interface ClusterServerMXBean

getSocketTimeout

public long getSocketTimeout()
Returns the socket timeout for a client.

Specified by:
getSocketTimeout in interface ClusterServerMXBean

getClusterIdleTime

public long getClusterIdleTime()
Returns the socket timeout for a client.

Specified by:
getClusterIdleTime in interface ClusterServerMXBean

getWarmupTime

public long getWarmupTime()
Returns the warmup time in milliseconds.

Specified by:
getWarmupTime in interface ClusterServerMXBean

getWeight

public int getWeight()
Returns the load-balance weight.

Specified by:
getWeight in interface ClusterServerMXBean

getClusterState

public java.lang.String getClusterState()
Description copied from interface: ClusterServerMXBean
Returns the lifecycle state as a cluster server.

Specified by:
getClusterState in interface ClusterServerMXBean

getLoadBalanceState

public java.lang.String getLoadBalanceState()
Description copied from interface: ClusterServerMXBean
Returns the load balance state.

Specified by:
getLoadBalanceState in interface ClusterServerMXBean

isHeartbeatActive

public boolean isHeartbeatActive()
Specified by:
isHeartbeatActive in interface ClusterServerMXBean

getLastHeartbeatTime

public java.util.Date getLastHeartbeatTime()
Specified by:
getLastHeartbeatTime in interface ClusterServerMXBean

getConnectionActiveCount

public int getConnectionActiveCount()
Description copied from interface: ClusterServerMXBean
Returns the number of connections actively being used to communicate with the target server.

Specified by:
getConnectionActiveCount in interface ClusterServerMXBean

getConnectionIdleCount

public int getConnectionIdleCount()
Description copied from interface: ClusterServerMXBean
Returns the number of open but currently unused connections to the target server.

Specified by:
getConnectionIdleCount in interface ClusterServerMXBean

getConnectionNewCountTotal

public long getConnectionNewCountTotal()
Description copied from interface: ClusterServerMXBean
Returns the number of connections that have been made to the target server.

Specified by:
getConnectionNewCountTotal in interface ClusterServerMXBean

getConnectionFailCountTotal

public long getConnectionFailCountTotal()
Description copied from interface: ClusterServerMXBean
Returns the number of connections which could not connect to the target server.

Specified by:
getConnectionFailCountTotal in interface ClusterServerMXBean

getLastFailTime

public java.util.Date getLastFailTime()
Description copied from interface: ClusterServerMXBean
Returns the time of the last failure.

Specified by:
getLastFailTime in interface ClusterServerMXBean

getLastSuccessTime

public java.util.Date getLastSuccessTime()

getLatencyFactor

public double getLatencyFactor()
Description copied from interface: ClusterServerMXBean
Returns the server's latency factory

Specified by:
getLatencyFactor in interface ClusterServerMXBean

getConnectionBusyCountTotal

public long getConnectionBusyCountTotal()
Description copied from interface: ClusterServerMXBean
Returns the number of connections which resulted in a busy response.

Specified by:
getConnectionBusyCountTotal in interface ClusterServerMXBean

getLastBusyTime

public java.util.Date getLastBusyTime()
Description copied from interface: ClusterServerMXBean
Returns the last time of the busy response.

Specified by:
getLastBusyTime in interface ClusterServerMXBean

getConnectionKeepaliveCountTotal

public long getConnectionKeepaliveCountTotal()
Description copied from interface: ClusterServerMXBean
Returns the number of connections that have been made to the target server.

Specified by:
getConnectionKeepaliveCountTotal in interface ClusterServerMXBean

getServerCpuLoadAvg

public double getServerCpuLoadAvg()
Description copied from interface: ClusterServerMXBean
Returns the server's load average.

Specified by:
getServerCpuLoadAvg in interface ClusterServerMXBean

start

public void start()
Description copied from interface: ClusterServerMXBean
Enables connections to the target server.

Specified by:
start in interface ClusterServerMXBean

stop

public void stop()
Description copied from interface: ClusterServerMXBean
Disables connections to the target server.

Specified by:
stop in interface ClusterServerMXBean

enableSessionOnly

public void enableSessionOnly()
Description copied from interface: ClusterServerMXBean
Enables connections to the target server.

Specified by:
enableSessionOnly in interface ClusterServerMXBean

ping

public boolean ping()
Description copied from interface: ClusterServerMXBean
Returns true if a connection can be made to the target server.

Specified by:
ping in interface ClusterServerMXBean

removeDynamicServer

public void removeDynamicServer()
Remove the server as a dynamic server

Specified by:
removeDynamicServer in interface ClusterServerMXBean

register

protected void register()

toString

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