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(ClusterPod pod,
int index)
getId
public java.lang.String getId()
- Gets the server identifier.
setId
public void setId(java.lang.String id)
- Sets the server identifier.
getDebugId
public java.lang.String getDebugId()
getServerClusterId
public java.lang.String getServerClusterId()
- Returns the server's id within the cluster
getServerDomainId
public java.lang.String getServerDomainId()
- Returns the server's id within all Resin clusters
getBamAdminName
public java.lang.String getBamAdminName()
- Returns the bam name
getCluster
public Cluster getCluster()
- Returns the cluster.
getMachine
public Machine getMachine()
- Returns the machine.
setMachine
protected void setMachine(Machine machine)
- Returns the machine.
getClusterPod
public ClusterPod getClusterPod()
- Returns the owning pod
isTriad
public boolean isTriad()
- Returns true if this server is a triad.
getTriadOwner
public ClusterPod.Owner getTriadOwner()
- Returns the pod owner
getIndex
public int getIndex()
- Returns the server index within the pod.
setAddress
@Configurable
public void setAddress(java.lang.String address)
throws java.net.UnknownHostException
- Sets the address
- Throws:
java.net.UnknownHostException
getAddress
public java.lang.String getAddress()
- Gets the address
isSSL
public boolean isSSL()
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.
setLoadBalanceConnectionMin
@Configurable
public void setLoadBalanceConnectionMin(int min)
- The minimum number of load balance connections for green load balancing.
getLoadBalanceConnectionMin
public int getLoadBalanceConnectionMin()
- The minimum number of load balance connections for green load balancing.
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.
setAcceptListenBacklog
public void setAcceptListenBacklog(ConfigProgram program)
- Sets the socket's listen property
setAcceptThreadMin
public void setAcceptThreadMin(ConfigProgram program)
throws ConfigException
- Sets the minimum spare listen.
- Throws:
ConfigException
setAcceptThreadMax
public void setAcceptThreadMax(ConfigProgram program)
throws ConfigException
- Sets the maximum spare listen.
- Throws:
ConfigException
setConnectionMax
public void setConnectionMax(ConfigProgram program)
- Sets the maximum connections per port
setKeepaliveMax
public void setKeepaliveMax(ConfigProgram program)
- Sets the maximum keepalive
setKeepaliveTimeout
public void setKeepaliveTimeout(ConfigProgram program)
- Sets the keepalive timeout
setKeepaliveConnectionTimeMax
public void setKeepaliveConnectionTimeMax(ConfigProgram program)
- Sets the keepalive connection timeout
setKeepaliveSelectEnable
public void setKeepaliveSelectEnable(ConfigProgram program)
- Sets the select-based keepalive timeout
setKeepaliveSelectMax
public void setKeepaliveSelectMax(ConfigProgram program)
- Sets the select-based keepalive timeout
setKeepaliveSelectThreadTimeout
public void setKeepaliveSelectThreadTimeout(ConfigProgram program)
- Sets the select-based keepalive timeout
setSocketTimeout
public void setSocketTimeout(ConfigProgram program)
- Sets the suspend timeout
setSuspendTimeMax
public void setSuspendTimeMax(ConfigProgram program)
- Sets the suspend timeout
addPingUrl
public void addPingUrl(java.lang.String url)
- Adds a ping url for availability testing
getPingUrlList
public java.util.ArrayList<java.lang.String> getPingUrlList()
- Returns the ping url list
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.
setUserName
public void setUserName(java.lang.String userName)
- Sets the user name.
setGroupName
public void setGroupName(java.lang.String groupName)
- Sets the group name.
isSelf
public boolean isSelf()
- Returns true for the self server
getServerPool
public final ServerPool getServerPool()
- Returns the server connector.
getHmtpStream
public ActorStream getHmtpStream()
- Returns the bam queue to the server.
isActiveRemote
public final boolean isActiveRemote()
- Returns true if the server is remote and active.
addPortDefault
public void addPortDefault(ContainerProgram program)
addContentProgram
public void addContentProgram(ConfigProgram program)
- Adds a program.
getServerProgram
public ConfigProgram getServerProgram()
- Returns the configuration program for the Server.
getPortDefaults
public ConfigProgram getPortDefaults()
- Returns the port defaults for the Server
init
public void init()
- Initialize
isActive
public boolean isActive()
- Test if the server is active, i.e. has received an active message.
getStateTimestamp
public long getStateTimestamp()
- Returns the last state change timestamp.
notifyStart
public boolean notifyStart(long timestamp)
- Notify that a start event has been received.
notifyStop
public boolean notifyStop(long timestamp)
- Notify that a start event has been received.
startServer
public Server startServer()
throws StartLifecycleException
- Starts the server.
- Throws:
StartLifecycleException
stopServer
public void stopServer()
- Starts the server.
generateIdPrefix
public void generateIdPrefix(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
decode
public static int decode(int code)