Java Doc for ServerConnector.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » server » cluster » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server resin 3.1.5 » resin » com.caucho.server.cluster 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.server.cluster.ServerConnector

ServerConnector
public class ServerConnector (Code)
Defines a member of the cluster. A ClusterClient obtained with ServerConnector.getClient is used to actually communicate with this ClusterServer when it is active in another instance of Resin .



Constructor Summary
public  ServerConnector(ClusterServer server)
    

Method Summary
public  voidallocateLoadBalance()
     Allocate a connection for load balancing.
public  voidbusy()
     Called when the server responds with "busy", e.g.
public  booleancanConnect()
     Returns true if can connect to the client.
public  booleancanOpenSoft()
     Returns true if the server can open a connection.
public  booleancanOpenSoftOrRecycle()
     Returns true if the server can open a connection.
public  voidclearRecycle()
     Clears the recycled connections, e.g.
 voidclose(ClusterStream stream)
     Closes the read/write pair for reuse.
public  voidclose()
    
public  voiddisable()
    
public  voidenable()
    
public  voidenableSessionOnly()
    
public  voidfailConnect()
     Called when the socket read/write fails.
public  voidfailSocket()
     Called when the socket read/write fails.
 voidfree(ClusterStream stream)
     Free the read/write pair for reuse.
public  voidfreeLoadBalance()
     Free a connection for load balancing.
public  intgetActiveCount()
     Returns the number of active connections.
public  StringgetAddress()
     Returns the hostname of the target server.
public  ServerConnectorMXBeangetAdmin()
     Returns the admin.
public  longgetBusyCountTotal()
     Returns the count of busy connections.
public  ClustergetCluster()
     Gets the owning cluster.
public  ClusterPortgetClusterPort()
     Gets the cluster port.
public  longgetConnectCountTotal()
    
public  doublegetCpuLoadAvg()
    
public  StringgetDebugId()
     Returns the debug id.
public  longgetFailCountTotal()
     Returns the total number of failed connect attempts.
public  StringgetId()
     Returns the user-readable id of the target server.
public  intgetIdleCount()
     Returns the number of idle connections.
public  intgetIndex()
     Returns the index of this connection in the connection group.
public  longgetKeepaliveCountTotal()
     Returns the number of times a keepalive connection has been used.
public  DategetLastBusyTime()
     Returns the time of the last busy.
public  DategetLastFailConnectTime()
     Returns the time of the last failure.
public  DategetLastFailTime()
     Returns the time of the last failure.
public  longgetLastSuccessTime()
     Returns the time of the last failure.
public  doublegetLatencyFactor()
    
public  intgetLoadBalanceAllocateCount()
    
public  longgetLoadBalanceConnectTimeout()
     Returns the socket timeout when connecting to the target server.
public  longgetLoadBalanceIdleTime()
     Returns how long the connection can be cached in the free pool.
public  longgetLoadBalanceRecoverTime()
     Returns how long the connection will be treated as dead.
public  longgetLoadBalanceSocketTimeout()
     Returns the socket timeout when reading from the target server.
public  longgetLoadBalanceWarmupTime()
     Returns the time in milliseconds for the slow start throttling.
public  intgetLoadBalanceWeight()
     Returns the load balance weight.
public  ObjectNamegetObjectName()
     Returns the object name.
public  intgetPort()
     Gets the port of the target server.
public  StringgetState()
     Returns the lifecycle state.
public  voidinit()
    
final public  booleanisActive()
     Returns true if the server is active.
public  booleanisDead()
     Returns true if the server is dead.
public  booleanisEnabled()
     Return true if active.
public  ClusterStreamopen()
     Open a stream to the target server for the load balancer.
public  ClusterStreamopenForSession()
     Open a stream to the target server for a session.
public  ClusterStreamopenIfLive()
     Open a stream to the target server object persistence.
public  ClusterStreamopenSoft()
     Open a stream to the target server.
 ReadWritePairopenTCPPair()
     Open a read/write pair to the target srun connection.
public  voidregister()
    
public  voidsetCpuLoadAvg(double load)
     Sets the CPU load avg (from backend).
public  voidstart()
     Enable the client.
public  voidstop()
     Disable the client.
public  voidtoBusy()
    
public  voidtoFail()
    
public  StringtoString()
    
public  voidwake()
     We now know that the server is live, e.g.


Constructor Detail
ServerConnector
public ServerConnector(ClusterServer server)(Code)




Method Detail
allocateLoadBalance
public void allocateLoadBalance()(Code)
Allocate a connection for load balancing.



busy
public void busy()(Code)
Called when the server responds with "busy", e.g. HTTP 503



canConnect
public boolean canConnect()(Code)
Returns true if can connect to the client.



canOpenSoft
public boolean canOpenSoft()(Code)
Returns true if the server can open a connection.



canOpenSoftOrRecycle
public boolean canOpenSoftOrRecycle()(Code)
Returns true if the server can open a connection.



clearRecycle
public void clearRecycle()(Code)
Clears the recycled connections, e.g. on detection of backend server going down.



close
void close(ClusterStream stream)(Code)
Closes the read/write pair for reuse. Called only from ClusterStream.close().



close
public void close()(Code)
Close the client



disable
public void disable()(Code)
Disable the client



enable
public void enable()(Code)
Enable the client



enableSessionOnly
public void enableSessionOnly()(Code)
Session only



failConnect
public void failConnect()(Code)
Called when the socket read/write fails.



failSocket
public void failSocket()(Code)
Called when the socket read/write fails.



free
void free(ClusterStream stream)(Code)
Free the read/write pair for reuse. Called only from ClusterStream.free()



freeLoadBalance
public void freeLoadBalance()(Code)
Free a connection for load balancing.



getActiveCount
public int getActiveCount()(Code)
Returns the number of active connections.



getAddress
public String getAddress()(Code)
Returns the hostname of the target server.



getAdmin
public ServerConnectorMXBean getAdmin()(Code)
Returns the admin.



getBusyCountTotal
public long getBusyCountTotal()(Code)
Returns the count of busy connections.



getCluster
public Cluster getCluster()(Code)
Gets the owning cluster.



getClusterPort
public ClusterPort getClusterPort()(Code)
Gets the cluster port.



getConnectCountTotal
public long getConnectCountTotal()(Code)
Returns the total number of successful socket connections



getCpuLoadAvg
public double getCpuLoadAvg()(Code)
Gets the CPU load avg



getDebugId
public String getDebugId()(Code)
Returns the debug id.



getFailCountTotal
public long getFailCountTotal()(Code)
Returns the total number of failed connect attempts.



getId
public String getId()(Code)
Returns the user-readable id of the target server.



getIdleCount
public int getIdleCount()(Code)
Returns the number of idle connections.



getIndex
public int getIndex()(Code)
Returns the index of this connection in the connection group.



getKeepaliveCountTotal
public long getKeepaliveCountTotal()(Code)
Returns the number of times a keepalive connection has been used.



getLastBusyTime
public Date getLastBusyTime()(Code)
Returns the time of the last busy.



getLastFailConnectTime
public Date getLastFailConnectTime()(Code)
Returns the time of the last failure.



getLastFailTime
public Date getLastFailTime()(Code)
Returns the time of the last failure.



getLastSuccessTime
public long getLastSuccessTime()(Code)
Returns the time of the last failure.



getLatencyFactor
public double getLatencyFactor()(Code)
Returns the latency factory



getLoadBalanceAllocateCount
public int getLoadBalanceAllocateCount()(Code)
Returns the number of load balance allocations



getLoadBalanceConnectTimeout
public long getLoadBalanceConnectTimeout()(Code)
Returns the socket timeout when connecting to the target server.



getLoadBalanceIdleTime
public long getLoadBalanceIdleTime()(Code)
Returns how long the connection can be cached in the free pool.



getLoadBalanceRecoverTime
public long getLoadBalanceRecoverTime()(Code)
Returns how long the connection will be treated as dead.



getLoadBalanceSocketTimeout
public long getLoadBalanceSocketTimeout()(Code)
Returns the socket timeout when reading from the target server.



getLoadBalanceWarmupTime
public long getLoadBalanceWarmupTime()(Code)
Returns the time in milliseconds for the slow start throttling.



getLoadBalanceWeight
public int getLoadBalanceWeight()(Code)
Returns the load balance weight.



getObjectName
public ObjectName getObjectName()(Code)
Returns the object name.



getPort
public int getPort()(Code)
Gets the port of the target server.



getState
public String getState()(Code)
Returns the lifecycle state.



init
public void init() throws Exception(Code)
Initialize



isActive
final public boolean isActive()(Code)
Returns true if the server is active.



isDead
public boolean isDead()(Code)
Returns true if the server is dead.



isEnabled
public boolean isEnabled()(Code)
Return true if active.



open
public ClusterStream open()(Code)
Open a stream to the target server for the load balancer. the socket's read/write pair.



openForSession
public ClusterStream openForSession()(Code)
Open a stream to the target server for a session. the socket's read/write pair.



openIfLive
public ClusterStream openIfLive()(Code)
Open a stream to the target server object persistence. the socket's read/write pair.



openSoft
public ClusterStream openSoft()(Code)
Open a stream to the target server. the socket's read/write pair.



openTCPPair
ReadWritePair openTCPPair() throws IOException(Code)
Open a read/write pair to the target srun connection. the socket's read/write pair.



register
public void register()(Code)



setCpuLoadAvg
public void setCpuLoadAvg(double load)(Code)
Sets the CPU load avg (from backend).



start
public void start()(Code)
Enable the client.



stop
public void stop()(Code)
Disable the client.



toBusy
public void toBusy()(Code)



toFail
public void toFail()(Code)



toString
public String toString()(Code)



wake
public void wake()(Code)
We now know that the server is live, e.g. if a sibling has contacted us.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.