|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.cluster.ServerConnector
public class ServerConnector
Defines a member of the cluster.
A ClusterClient obtained with #getClient is used to actually
communicate with this ClusterServer when it is active in another instance of
Resin .
| Constructor Summary | |
|---|---|
ServerConnector(ClusterServer server)
|
|
| Method Summary | |
|---|---|
void |
allocateLoadBalance()
Allocate a connection for load balancing. |
void |
busy()
Called when the server responds with "busy", e.g. |
boolean |
canConnect()
Returns true if can connect to the client. |
boolean |
canOpenSoft()
Returns true if the server can open a connection. |
boolean |
canOpenSoftOrRecycle()
Returns true if the server can open a connection. |
void |
clearRecycle()
Clears the recycled connections, e.g. |
void |
close()
Close the client |
void |
disable()
Disable the client |
void |
enable()
Enable the client |
void |
enableSessionOnly()
Session only |
void |
failConnect()
Called when the socket read/write fails. |
void |
failSocket()
Called when the socket read/write fails. |
void |
freeLoadBalance()
Free a connection for load balancing. |
int |
getActiveCount()
Returns the number of active connections. |
java.lang.String |
getAddress()
Returns the hostname of the target server. |
ServerConnectorMXBean |
getAdmin()
Returns the admin. |
long |
getBusyCountTotal()
Returns the count of busy connections. |
Cluster |
getCluster()
Gets the owning cluster. |
ClusterPort |
getClusterPort()
Gets the cluster port. |
long |
getConnectCountTotal()
Returns the total number of successful socket connections |
double |
getCpuLoadAvg()
Gets the CPU load avg |
java.lang.String |
getDebugId()
Returns the debug id. |
long |
getFailCountTotal()
Returns the total number of failed connect attempts. |
java.lang.String |
getId()
Returns the user-readable id of the target server. |
int |
getIdleCount()
Returns the number of idle connections. |
int |
getIndex()
Returns the index of this connection in the connection group. |
long |
getKeepaliveCountTotal()
Returns the number of times a keepalive connection has been used. |
java.util.Date |
getLastBusyTime()
Returns the time of the last busy. |
java.util.Date |
getLastFailConnectTime()
Returns the time of the last failure. |
java.util.Date |
getLastFailTime()
Returns the time of the last failure. |
long |
getLastSuccessTime()
Returns the time of the last failure. |
double |
getLatencyFactor()
Returns the latency factory |
int |
getLoadBalanceAllocateCount()
Returns the number of load balance allocations |
long |
getLoadBalanceConnectTimeout()
Returns the socket timeout when connecting to the target server. |
long |
getLoadBalanceIdleTime()
Returns how long the connection can be cached in the free pool. |
long |
getLoadBalanceRecoverTime()
Returns how long the connection will be treated as dead. |
long |
getLoadBalanceSocketTimeout()
Returns the socket timeout when reading from the target server. |
long |
getLoadBalanceWarmupTime()
Returns the time in milliseconds for the slow start throttling. |
int |
getLoadBalanceWeight()
Returns the load balance weight. |
javax.management.ObjectName |
getObjectName()
Returns the object name. |
int |
getPort()
Gets the port of the target server. |
java.lang.String |
getState()
Returns the lifecycle state. |
void |
init()
Initialize |
boolean |
isActive()
Returns true if the server is active. |
boolean |
isDead()
Returns true if the server is dead. |
boolean |
isEnabled()
Return true if active. |
ClusterStream |
open()
Open a stream to the target server for the load balancer. |
ClusterStream |
openForSession()
Open a stream to the target server for a session. |
ClusterStream |
openIfLive()
Open a stream to the target server object persistence. |
ClusterStream |
openSoft()
Open a stream to the target server. |
void |
setCpuLoadAvg(double load)
Sets the CPU load avg (from backend). |
void |
start()
Enable the client. |
void |
stop()
Disable the client. |
void |
toBusy()
|
void |
toFail()
|
java.lang.String |
toString()
|
void |
wake()
We now know that the server is live, e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ServerConnector(ClusterServer server)
| Method Detail |
|---|
public Cluster getCluster()
public javax.management.ObjectName getObjectName()
public ServerConnectorMXBean getAdmin()
public ClusterPort getClusterPort()
public java.lang.String getId()
public int getIndex()
public java.lang.String getAddress()
public int getPort()
public long getLoadBalanceWarmupTime()
public long getLoadBalanceConnectTimeout()
public long getLoadBalanceSocketTimeout()
public long getLoadBalanceIdleTime()
public long getLoadBalanceRecoverTime()
public int getLoadBalanceWeight()
public void init()
throws java.lang.Exception
java.lang.Exceptionpublic int getActiveCount()
public int getIdleCount()
public int getLoadBalanceAllocateCount()
public void allocateLoadBalance()
public void freeLoadBalance()
public long getConnectCountTotal()
public long getKeepaliveCountTotal()
public long getFailCountTotal()
public java.util.Date getLastFailTime()
public java.util.Date getLastFailConnectTime()
public long getLastSuccessTime()
public double getLatencyFactor()
public long getBusyCountTotal()
public java.util.Date getLastBusyTime()
public void setCpuLoadAvg(double load)
public double getCpuLoadAvg()
public java.lang.String getDebugId()
public final boolean isActive()
public boolean isDead()
public void enable()
public void disable()
public java.lang.String getState()
public boolean canOpenSoftOrRecycle()
public boolean canOpenSoft()
public boolean isEnabled()
public void toBusy()
public void toFail()
public void failSocket()
public void failConnect()
public void busy()
public void start()
public void stop()
public void enableSessionOnly()
public ClusterStream openSoft()
public ClusterStream openIfLive()
public ClusterStream openForSession()
public ClusterStream open()
public void wake()
public void clearRecycle()
public void close()
public boolean canConnect()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||