com.hazelcast.cluster.client
Class ClientMembershipEvent

java.lang.Object
  extended by com.hazelcast.cluster.client.ClientMembershipEvent
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable

public final class ClientMembershipEvent
extends Object
implements IdentifiedDataSerializable


Field Summary
static int MEMBER_ADDED
           
static int MEMBER_ATTRIBUTE_CHANGED
           
static int MEMBER_REMOVED
           
 
Constructor Summary
ClientMembershipEvent()
           
ClientMembershipEvent(Member member, int eventType)
           
ClientMembershipEvent(Member member, MemberAttributeChange memberAttributeChange)
           
 
Method Summary
 int getEventType()
          Returns the membership event type; #MEMBER_ADDED or #MEMBER_REMOVED
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 int getId()
          Returns type identifier for this class.
 Member getMember()
          Returns the removed or added member.
 MemberAttributeChange getMemberAttributeChange()
          Returns the member attribute chance operation to execute if event type is MEMBER_ATTRIBUTE_CHANGED.
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

MEMBER_ATTRIBUTE_CHANGED

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

ClientMembershipEvent

public ClientMembershipEvent()

ClientMembershipEvent

public ClientMembershipEvent(Member member,
                             int eventType)

ClientMembershipEvent

public ClientMembershipEvent(Member member,
                             MemberAttributeChange memberAttributeChange)
Method Detail

getEventType

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

Returns:
the membership event type

getMember

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

Returns:
member which is removed/added

getMemberAttributeChange

public MemberAttributeChange getMemberAttributeChange()
Returns the member attribute chance operation to execute if event type is MEMBER_ATTRIBUTE_CHANGED.

Returns:
MemberAttributeChange to execute

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Specified by:
getId in interface IdentifiedDataSerializable
Returns:
type id


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.