Class StaticMember
java.lang.Object
org.apache.catalina.tribes.membership.MemberImpl
org.apache.catalina.tribes.membership.StaticMember
- All Implemented Interfaces:
Externalizable, Serializable, Member
Static member representation for cluster membership.
- See Also:
-
Field Summary
Fields inherited from class MemberImpl
command, dataPkg, domain, host, hostname, local, memberAliveTime, msgCount, payload, port, securePort, serviceStartTime, sm, TRIBES_MBR_BEGIN, TRIBES_MBR_END, udpPort, uniqueIdFields inherited from interface Member
SHUTDOWN_PAYLOAD -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.StaticMember(String host, int port, long aliveTime) Creates a static member with the given host, port, and alive time.StaticMember(String host, int port, long aliveTime, byte[] payload) Creates a static member with the given host, port, alive time, and payload. -
Method Summary
Methods inherited from class MemberImpl
bToS, bToS, equals, getCommand, getData, getData, getData, getDataLength, getDomain, getHost, getHostname, getMember, getMember, getMember, getMember, getMemberAliveTime, getMsgCount, getName, getPayload, getPort, getSecurePort, getServiceStartTime, getUdpPort, getUniqueId, hashCode, inc, isFailing, isLocal, isReady, isSuspect, readExternal, setCommand, setDomain, setHost, setHostname, setLocal, setMemberAliveTime, setMsgCount, setPayload, setPort, setSecurePort, setServiceStartTime, setUdpPort, setUniqueId, toString, writeExternal
-
Constructor Details
-
StaticMember
public StaticMember()Default constructor. -
StaticMember
Creates a static member with the given host, port, and alive time.- Parameters:
host- the host addressport- the port numberaliveTime- the time the member was last alive- Throws:
IOException- if serialization fails
-
StaticMember
Creates a static member with the given host, port, alive time, and payload.- Parameters:
host- the host addressport- the port numberaliveTime- the time the member was last alivepayload- the member payload data- Throws:
IOException- if serialization fails
-
-
Method Details
-
setHost
Sets the host for this member.- Parameters:
host- String, either in byte array string format, like {214,116,1,3} or as a regular hostname, 127.0.0.1 or tomcat01.mydomain.com
-
setDomain
Sets the domain for this member.- Parameters:
domain- String, either in byte array string format, like {214,116,1,3} or as a regular string value like 'mydomain'. The latter will be converted using ISO-8859-1 encoding
-
setUniqueId
Sets the unique identifier for this member.- Parameters:
id- String, must be in byte array string format, like {214,116,1,3} and exactly 16 bytes long
-