|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.hazelcast.core.MembershipEvent
public class MembershipEvent
Membership event fired when a new member is added to the cluster and/or when a member leaves the cluster.
MembershipListener
,
Serialized FormField Summary | |
---|---|
static int |
MEMBER_ADDED
This event type is fired when a new member joins the cluster. |
static int |
MEMBER_ATTRIBUTE_CHANGED
This event type is fired if a member attribute has been changed or removed. |
static int |
MEMBER_REMOVED
This event type is fired if a member left the cluster or was decided to be unresponsive by other members for a extended time. |
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
MembershipEvent(Cluster cluster,
Member member,
int eventType,
Set<Member> members)
|
Method Summary | |
---|---|
Cluster |
getCluster()
Returns the cluster of the event. |
int |
getEventType()
Returns the membership event type; #MEMBER_ADDED #MEMBER_REMOVED #MEMBER_ATTRIBUTE_CHANGED |
Member |
getMember()
Returns the removed or added member. |
Set<Member> |
getMembers()
Returns a consistent view of the the members immediately after this MembershipEvent has been processed. |
String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MEMBER_ADDED
public static final int MEMBER_REMOVED
public static final int MEMBER_ATTRIBUTE_CHANGED
Constructor Detail |
---|
public MembershipEvent(Cluster cluster, Member member, int eventType, Set<Member> members)
Method Detail |
---|
public Set<Member> getMembers()
Cluster.getMembers()
method is that the content could already
have changed while processing this event, so it becomes very difficult to write a deterministic algorithm since
you cannot get a deterministic view of the members. This method solves that problem.
The set is immutable and ordered. For more information see Cluster.getMembers()
.
public Cluster getCluster()
public int getEventType()
public Member getMember()
public String toString()
toString
in class EventObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |