Package org.apache.catalina.tribes
Interface Member
- 
- All Superinterfaces:
- java.io.Serializable
 - All Known Implementing Classes:
- MemberImpl,- StaticMember
 
 public interface Member extends java.io.SerializableThe Member interface, defines a member in the group. Each member can carry a set of properties, defined by the actual implementation.
 A member is identified by the host/ip/uniqueId
 The host is what interface the member is listening to, to receive data
 The port is what port the member is listening to, to receive data
 The uniqueId defines the session id for the member. This is an important feature since a member that has crashed and the starts up again on the same port/host is not guaranteed to be the same member, so no state transfers will ever be confused
- 
- 
Field SummaryFields Modifier and Type Field Description static byte[]SHUTDOWN_PAYLOADWhen a member leaves the cluster, the payload of the memberDisappeared member will be the following bytes.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]getCommand()returns the command associated with this memberbyte[]getData(boolean getalive)Highly optimized version of serializing a member into a byte array Returns a cached byte[] reference, do not modify this databyte[]getData(boolean getalive, boolean reset)Highly optimized version of serializing a member into a byte array Returns a cached byte[] reference, do not modify this dataintgetDataLength()Length of a message obtained bygetData(boolean)orgetData(boolean, boolean).byte[]getDomain()Domain for this clusterbyte[]getHost()Returns the listen host for the ChannelReceiver implementationlonggetMemberAliveTime()Contains information on how long this member has been online.java.lang.StringgetName()byte[]getPayload()returns the payload associated with this memberintgetPort()Returns the listen port for the ChannelReceiver implementationintgetSecurePort()Returns the secure listen port for the ChannelReceiver implementation.intgetUdpPort()Returns the UDP port that this member is listening to for UDP messages.byte[]getUniqueId()returns a UUID unique for this member over all sessions.booleanisFailing()booleanisLocal()booleanisReady()The current state of the memberbooleanisSuspect()The current state of the membervoidsetCommand(byte[] command)voidsetLocal(boolean local)voidsetMemberAliveTime(long memberAliveTime)voidsetPayload(byte[] payload)
 
- 
- 
- 
Method Detail- 
getNamejava.lang.String getName() - Returns:
- the name of this node, should be unique within the group.
 
 - 
getHostbyte[] getHost() Returns the listen host for the ChannelReceiver implementation- Returns:
- IPv4 or IPv6 representation of the host address this member listens to incoming data
- See Also:
- ChannelReceiver
 
 - 
getPortint getPort() Returns the listen port for the ChannelReceiver implementation- Returns:
- the listen port for this member, -1 if its not listening on an insecure port
- See Also:
- ChannelReceiver
 
 - 
getSecurePortint getSecurePort() Returns the secure listen port for the ChannelReceiver implementation. Returns -1 if its not listening to a secure port.- Returns:
- the listen port for this member, -1 if its not listening on a secure port
- See Also:
- ChannelReceiver
 
 - 
getUdpPortint getUdpPort() Returns the UDP port that this member is listening to for UDP messages.- Returns:
- the listen UDP port for this member, -1 if its not listening on a UDP port
 
 - 
getMemberAliveTimelong getMemberAliveTime() 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 group.- Returns:
- nr of milliseconds since this member started.
 
 - 
setMemberAliveTimevoid setMemberAliveTime(long memberAliveTime) 
 - 
isReadyboolean isReady() The current state of the member- Returns:
- boolean - true if the member is functioning correctly
 
 - 
isSuspectboolean isSuspect() The current state of the member- Returns:
- boolean - true if the member is suspect, but the crash has not been confirmed
 
 - 
isFailingboolean isFailing() - Returns:
- boolean - true if the member has been confirmed to malfunction
 
 - 
getUniqueIdbyte[] getUniqueId() returns a UUID unique for this member over all sessions. If the member crashes and restarts, the uniqueId will be different.- Returns:
- byte[]
 
 - 
getPayloadbyte[] getPayload() returns the payload associated with this member- Returns:
- byte[]
 
 - 
setPayloadvoid setPayload(byte[] payload) 
 - 
getCommandbyte[] getCommand() returns the command associated with this member- Returns:
- byte[]
 
 - 
setCommandvoid setCommand(byte[] command) 
 - 
getDomainbyte[] getDomain() Domain for this cluster- Returns:
- byte[]
 
 - 
getDatabyte[] getData(boolean getalive) Highly optimized version of serializing a member into a byte array Returns a cached byte[] reference, do not modify this data- Parameters:
- getalive- calculate memberAlive time
- Returns:
- the data as a byte array
 
 - 
getDatabyte[] getData(boolean getalive, boolean reset)Highly optimized version of serializing a member into a byte array Returns a cached byte[] reference, do not modify this data- Parameters:
- getalive- calculate memberAlive time
- reset- reset the cached data package, and create a new one
- Returns:
- the data as a byte array
 
 - 
getDataLengthint getDataLength() Length of a message obtained bygetData(boolean)orgetData(boolean, boolean).- Returns:
- the data length
 
 - 
isLocalboolean isLocal() - Returns:
- boolean - true if the member is local member
 
 - 
setLocalvoid setLocal(boolean local) 
 
- 
 
-