|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.cluster.mcast.McastMembership
A membership implementation using simple multicast. This is the representation of a multicast membership. This class is responsible for maintaining a list of active cluster nodes in the cluster. If a node fails to send out a heartbeat, the node will be dismissed.
Nested Class Summary | |
protected static class |
McastMembership.MbrEntry
Inner class that represents a member entry |
Field Summary | |
protected java.util.HashMap |
map
A map of all the members in the cluster. |
protected java.lang.String |
name
The name of this membership, has to be the same as the name for the local member |
Constructor Summary | |
McastMembership(java.lang.String myName)
Constructs a new membership |
Method Summary | |
McastMember[] |
expire(long maxtime)
Runs a refresh cycle and returns a list of members that has expired. |
protected McastMembership.MbrEntry[] |
getMemberEntries()
|
McastMember[] |
getMembers()
Returning a list of all the members in the membership |
boolean |
memberAlive(McastMember m)
Notify the membership that this member has announced itself. |
void |
reset()
Reset the membership and start over fresh. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected java.util.HashMap map
Constructor Detail |
public McastMembership(java.lang.String myName)
myName
- - has to be the name of the local member. Used to filter the local member from the cluster membershipMethod Detail |
public void reset()
public boolean memberAlive(McastMember m)
m
- - the member that just pinged us
public McastMember[] expire(long maxtime)
maxtime
- - the max time a member can remain unannounced before it is considered dead.
public McastMember[] getMembers()
protected McastMembership.MbrEntry[] getMemberEntries()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |