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
void
allocateLoadBalance
()
Allocate a connection for load balancing.
public
void
busy
()
Called when the server responds with "busy", e.g.
public
boolean
canConnect
()
Returns true if can connect to the client.
public
boolean
canOpenSoft
()
Returns true if the server can open a connection.
public
boolean
canOpenSoftOrRecycle
()
Returns true if the server can open a connection.
public
void
clearRecycle
()
Clears the recycled connections, e.g.
void
close
(
ClusterStream
stream)
Closes the read/write pair for reuse.
public
void
close
()
public
void
disable
()
public
void
enable
()
public
void
enableSessionOnly
()
public
void
failConnect
()
Called when the socket read/write fails.
public
void
failSocket
()
Called when the socket read/write fails.
void
free
(
ClusterStream
stream)
Free the read/write pair for reuse.
public
void
freeLoadBalance
()
Free a connection for load balancing.
public
int
getActiveCount
()
Returns the number of active connections.
public
String
getAddress
()
Returns the hostname of the target server.
public
ServerConnectorMXBean
getAdmin
()
Returns the admin.
public
long
getBusyCountTotal
()
Returns the count of busy connections.
public
Cluster
getCluster
()
Gets the owning cluster.
public
ClusterPort
getClusterPort
()
Gets the cluster port.
public
long
getConnectCountTotal
()
public
double
getCpuLoadAvg
()
public
String
getDebugId
()
Returns the debug id.
public
long
getFailCountTotal
()
Returns the total number of failed connect attempts.
public
String
getId
()
Returns the user-readable id of the target server.
public
int
getIdleCount
()
Returns the number of idle connections.
public
int
getIndex
()
Returns the index of this connection in the connection group.
public
long
getKeepaliveCountTotal
()
Returns the number of times a keepalive connection has been used.
public
Date
getLastBusyTime
()
Returns the time of the last busy.
public
Date
getLastFailConnectTime
()
Returns the time of the last failure.
public
Date
getLastFailTime
()
Returns the time of the last failure.
public
long
getLastSuccessTime
()
Returns the time of the last failure.
public
double
getLatencyFactor
()
public
int
getLoadBalanceAllocateCount
()
public
long
getLoadBalanceConnectTimeout
()
Returns the socket timeout when connecting to the target server.
public
long
getLoadBalanceIdleTime
()
Returns how long the connection can be cached in the free pool.
public
long
getLoadBalanceRecoverTime
()
Returns how long the connection will be treated as dead.
public
long
getLoadBalanceSocketTimeout
()
Returns the socket timeout when reading from the target server.
public
long
getLoadBalanceWarmupTime
()
Returns the time in milliseconds for the slow start throttling.
public
int
getLoadBalanceWeight
()
Returns the load balance weight.
public
ObjectName
getObjectName
()
Returns the object name.
public
int
getPort
()
Gets the port of the target server.
public
String
getState
()
Returns the lifecycle state.
public
void
init
()
final
public
boolean
isActive
()
Returns true if the server is active.
public
boolean
isDead
()
Returns true if the server is dead.
public
boolean
isEnabled
()
Return true if active.
public
ClusterStream
open
()
Open a stream to the target server for the load balancer.
public
ClusterStream
openForSession
()
Open a stream to the target server for a session.
public
ClusterStream
openIfLive
()
Open a stream to the target server object persistence.
public
ClusterStream
openSoft
()
Open a stream to the target server.
ReadWritePair
openTCPPair
()
Open a read/write pair to the target srun connection.
public
void
register
()
public
void
setCpuLoadAvg
(double load)
Sets the CPU load avg (from backend).
public
void
start
()
Enable the client.
public
void
stop
()
Disable the client.
public
void
toBusy
()
public
void
toFail
()
public
String
toString
()
public
void
wake
()
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.