| java.lang.Object org.apache.catalina.tribes.membership.MemberImpl
All known Subclasses: org.apache.catalina.tribes.membership.StaticMember,
MemberImpl | public class MemberImpl implements Member,java.io.Externalizable(Code) | | A membership implementation using simple multicast.
This is the representation of a multicast member.
Carries the host, and port of the this or other cluster nodes.
author: Filip Hanik version: $Revision: 538977 $, $Date: 2007-05-17 17:43:49 +0200 (jeu., 17 mai 2007) $ |
MEMBER_NAME | final public static transient String MEMBER_NAME(Code) | | |
TCP_LISTEN_HOST | final public static transient String TCP_LISTEN_HOST(Code) | | |
TCP_LISTEN_PORT | final public static transient String TCP_LISTEN_PORT(Code) | | Public properties specific to this implementation
|
TRIBES_MBR_BEGIN | final public static transient byte[] TRIBES_MBR_BEGIN(Code) | | |
TRIBES_MBR_END | final public static transient byte[] TRIBES_MBR_END(Code) | | |
command | protected byte[] command(Code) | | Command, so that the custom payload doesn't have to be used
This is for internal tribes use, such as SHUTDOWN_COMMAND
|
dataPkg | protected transient byte[] dataPkg(Code) | | To avoid serialization over and over again, once the local dataPkg
has been set, we use that to transmit data
|
domain | protected byte[] domain(Code) | | Domain if we want to filter based on domain.
|
host | protected byte[] host(Code) | | The listen host for this member
|
memberAliveTime | protected long memberAliveTime(Code) | | The number of milliseconds since this members was
created, is kept track of using the start time
|
msgCount | protected int msgCount(Code) | | Counter for how many broadcast messages have been sent from this member
|
payload | protected byte[] payload(Code) | | Custom payload that an app framework can broadcast
Also used to transport stop command.
|
port | protected int port(Code) | | The tcp listen port for this member
|
securePort | protected int securePort(Code) | | The tcp/SSL listen port for this member
|
serviceStartTime | protected transient long serviceStartTime(Code) | | For the local member only
|
uniqueId | protected byte[] uniqueId(Code) | | Unique session Id for this member
|
MemberImpl | public MemberImpl()(Code) | | Empty constructor for serialization
|
MemberImpl | public MemberImpl(String host, int port, long aliveTime) throws IOException(Code) | | Construct a new member object
Parameters: name - - the name of this member, cluster unique Parameters: domain - - the cluster domain name of this member Parameters: host - - the tcp listen host Parameters: port - - the tcp listen port |
equals | public boolean equals(Object o)(Code) | | Returns true if the param o is a McastMember with the same name
Parameters: o - |
getCommand | public byte[] getCommand()(Code) | | |
getData | public byte[] getData()(Code) | | Create a data package to send over the wire representing this member.
This is faster than serialization.
- the bytes for this member deserialized throws: Exception - |
getData | public byte[] getData(boolean getalive)(Code) | | Highly optimized version of serializing a member into a byte array
Returns a cached byte[] reference, do not modify this data
Parameters: getalive - boolean byte[] |
getData | public byte[] getData(boolean getalive, boolean reset)(Code) | | Parameters: getalive - boolean - calculate memberAlive time Parameters: reset - boolean - reset the cached data package, and create a new one byte[] |
getDataLength | public int getDataLength()(Code) | | |
getDomain | public byte[] getDomain()(Code) | | |
getHost | public byte[] getHost()(Code) | | Return the TCP listen host for this member
IP address or host name |
getMember | public static MemberImpl getMember(byte[] data, MemberImpl member)(Code) | | Deserializes a member from data sent over the wire
Parameters: data - - the bytes received a member object. |
getMember | public static MemberImpl getMember(byte[] data, int offset, int length)(Code) | | |
getMemberAliveTime | public long getMemberAliveTime()(Code) | | Contains information on how long this member has been online.
The result is the number of milli seconds this member has been
broadcasting its membership to the cluster.
nr of milliseconds since this member started. |
getName | public String getName()(Code) | | Return the name of this object
a unique name to the cluster |
getPayload | public byte[] getPayload()(Code) | | |
getPort | public int getPort()(Code) | | Return the listen port of this member
- tcp listen port |
getSecurePort | public int getSecurePort()(Code) | | |
getServiceStartTime | public long getServiceStartTime()(Code) | | |
getUniqueId | public byte[] getUniqueId()(Code) | | |
inc | protected void inc()(Code) | | Increment the message count.
|
isFailing | public boolean isFailing()(Code) | | |
isReady | public boolean isReady()(Code) | | |
isSuspect | public boolean isSuspect()(Code) | | |
setCommand | public void setCommand(byte[] command)(Code) | | |
setDomain | public void setDomain(byte[] domain)(Code) | | |
setHost | public void setHost(byte[] host)(Code) | | |
setMemberAliveTime | public void setMemberAliveTime(long time)(Code) | | |
setMsgCount | public void setMsgCount(int msgCount)(Code) | | |
setPayload | public void setPayload(byte[] payload)(Code) | | |
setPort | public void setPort(int port)(Code) | | |
setSecurePort | public void setSecurePort(int securePort)(Code) | | |
setServiceStartTime | public void setServiceStartTime(long serviceStartTime)(Code) | | |
setUniqueId | public void setUniqueId(byte[] uniqueId)(Code) | | |
toString | public String toString()(Code) | | String representation of this object
|
|
|