com.hazelcast.core
Class MembershipEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.hazelcast.core.MembershipEvent
All Implemented Interfaces:
Serializable

public class MembershipEvent
extends EventObject

Membership event fired when a new member is added to the cluster and/or when a member leaves the cluster.

See Also:
MembershipListener, Serialized Form

Field Summary
static int MEMBER_ADDED
           
static int MEMBER_REMOVED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MembershipEvent(Cluster cluster, Member member, int eventType)
           
 
Method Summary
 Cluster getCluster()
          Returns the cluster of the event.
 int getEventType()
          Returns the membership event type; #MEMBER_ADDED or #MEMBER_REMOVED
 Member getMember()
          Returns the removed or added member.
 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

MEMBER_ADDED

public static final int MEMBER_ADDED
See Also:
Constant Field Values

MEMBER_REMOVED

public static final int MEMBER_REMOVED
See Also:
Constant Field Values
Constructor Detail

MembershipEvent

public MembershipEvent(Cluster cluster,
                       Member member,
                       int eventType)
Method Detail

getCluster

public Cluster getCluster()
Returns the cluster of the event.

Returns:

getEventType

public int getEventType()
Returns the membership event type; #MEMBER_ADDED or #MEMBER_REMOVED

Returns:
the membeship event type

getMember

public Member getMember()
Returns the removed or added member.

Returns:
member which is removed/added

toString

public String toString()
Overrides:
toString in class EventObject


Copyright © 2008-2012 Hazel Ltd. All Rights Reserved.