in the conf file.
A ServerConnector obtained with #getServerConnector is used to actually
communicate with this ClusterServer when it is active in another instance of
Resin .
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ClusterServer
public ClusterServer(Cluster cluster)
ClusterServer
public ClusterServer(Machine machine)
ClusterServer
public ClusterServer(Cluster cluster,
boolean test)
getId
public java.lang.String getId()
- Gets the server identifier.
setId
public void setId(java.lang.String id)
- Sets the server identifier.
getCluster
public Cluster getCluster()
- Returns the cluster.
getMachine
public Machine getMachine()
- Returns the machine.
getIndex
public int getIndex()
- Returns the server index.
setKeepaliveTimeout
public void setKeepaliveTimeout(Period timeout)
- Sets the keepalive timeout.
getKeepaliveTimeout
public long getKeepaliveTimeout()
- Gets the keepalive timeout.
setAddress
public void setAddress(java.lang.String address)
throws java.net.UnknownHostException
- Sets the address
- Throws:
java.net.UnknownHostException
setBackup
public void setBackup(boolean isBackup)
- Sets true for backups
setDynamic
public void setDynamic(boolean isDynamic)
- True for a dynamic server
isDynamic
public boolean isDynamic()
- True for a dynamic server
setLoadBalanceConnectTimeout
public void setLoadBalanceConnectTimeout(Period period)
- Sets the loadBalance connection time.
getLoadBalanceConnectTimeout
public long getLoadBalanceConnectTimeout()
- Gets the loadBalance connection time.
setLoadBalanceSocketTimeout
public void setLoadBalanceSocketTimeout(Period period)
- Sets the loadBalance socket time.
getLoadBalanceSocketTimeout
public long getLoadBalanceSocketTimeout()
- Gets the loadBalance socket time.
setLoadBalanceIdleTime
public void setLoadBalanceIdleTime(Period period)
- Sets the loadBalance max-idle-time.
getLoadBalanceIdleTime
public long getLoadBalanceIdleTime()
- Sets the loadBalance idle-time.
setLoadBalanceRecoverTime
public void setLoadBalanceRecoverTime(Period period)
- Sets the loadBalance fail-recover-time.
getLoadBalanceRecoverTime
public long getLoadBalanceRecoverTime()
- Gets the loadBalance fail-recover-time.
setSocketTimeout
public void setSocketTimeout(Period period)
- Sets the loadBalance read/write timeout
getSocketTimeout
public long getSocketTimeout()
- Gets the loadBalance read/write timeout
setLoadBalanceWarmupTime
public void setLoadBalanceWarmupTime(Period period)
- Sets the loadBalance warmup time
getLoadBalanceWarmupTime
public long getLoadBalanceWarmupTime()
- Gets the loadBalance warmup time
setLoadBalanceWeight
public void setLoadBalanceWeight(int weight)
- Sets the loadBalance weight
getLoadBalanceWeight
public int getLoadBalanceWeight()
- Gets the loadBalance weight
addJavaExe
public void addJavaExe(java.lang.String args)
- Arguments on boot
addJvmArg
public void addJvmArg(java.lang.String args)
- Arguments on boot
addJvmClasspath
public void addJvmClasspath(java.lang.String args)
- Arguments on boot
addWatchdogArg
public void addWatchdogArg(java.lang.String args)
- Arguments on boot
addWatchdogJvmArg
public void addWatchdogJvmArg(java.lang.String args)
- Arguments on boot
addWatchdogPassword
public void addWatchdogPassword(java.lang.String args)
- Arguments on boot
addWatchdogPort
public void addWatchdogPort(int port)
- Arguments on boot
addWatchdogAddress
public void addWatchdogAddress(java.lang.String addr)
- Arguments on boot
setPort
public void setPort(int port)
- Sets a port.
getPort
public int getPort()
- Gets the port.
addPortDefault
public void addPortDefault(ContainerProgram program)
- Adds a port default
createHttp
public Port createHttp()
throws ConfigException
- Adds a http.
- Throws:
ConfigException
createProtocol
public Port createProtocol()
throws ConfigException
- Adds a custom-protocol port.
- Throws:
ConfigException
bind
public void bind(java.lang.String address,
int port,
QServerSocket ss)
throws java.lang.Exception
- Pre-binding of ports.
- Throws:
java.lang.Exception
setUserName
public void setUserName(java.lang.String userName)
- Sets the user name.
setGroupName
public void setGroupName(java.lang.String groupName)
- Sets the group name.
getPorts
public java.util.ArrayList<Port> getPorts()
- Returns the ports.
createClusterPort
public ClusterPort createClusterPort()
- Sets the ClusterPort.
getClusterPort
public ClusterPort getClusterPort()
- Sets the ClusterPort.
isSelf
public boolean isSelf()
- Returns true for the self server
isSSL
public boolean isSSL()
- Returns true for secure.
getServerPool
public ServerPool getServerPool()
- Returns the server connector.
addContentProgram
public void addContentProgram(ConfigProgram program)
- Adds a program.
getServerProgram
public ConfigProgram getServerProgram()
- Adds a program.
init
public void init()
throws java.lang.Exception
- Initialize
- Throws:
java.lang.Exception
startServer
public Server startServer()
throws StartLifecycleException
- Starts the server.
- Throws:
StartLifecycleException
generateBackupCode
public long generateBackupCode()
- Generate the primary, secondary, tertiary, returning the value encoded
in a long.
generateBackupCode
public void generateBackupCode(java.lang.StringBuilder cb)
- Adds the primary/backup/third digits to the id.
getAdmin
public ClusterServerMXBean getAdmin()
- Returns the admin object
close
public void close()
- Close any ports.
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object