Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
Public Member Functions | List of all members
hazelcast::client::InitialMembershipListener Class Referenceabstract

The InitializingMembershipListener is a MembershipListener that will first receives a InitialMembershipEvent when it is registered so it immediately knows which members are available. More...

#include <InitialMembershipListener.h>

Public Member Functions

virtual void init (const InitialMembershipEvent &event)=0
 Is called when this listener is registered. More...
 
virtual void memberAdded (const MembershipEvent &membershipEvent)=0
 Invoked when a new member is added to the cluster. More...
 
virtual void memberRemoved (const MembershipEvent &membershipEvent)=0
 Invoked when an existing member leaves the cluster. More...
 
virtual void memberAttributeChanged (const MemberAttributeEvent &memberAttributeEvent)=0
 Invoked when an attribute of a member was changed. More...
 

Detailed Description

The InitializingMembershipListener is a MembershipListener that will first receives a InitialMembershipEvent when it is registered so it immediately knows which members are available.

After that event has been received, it will receive the normal MembershipEvents.

When the InitializingMembershipListener already is registered on a Cluster and is registered again on the same Cluster instance, it will not receive an additional MembershipInitializeEvent. So this is a once only event.

Warning 1: If listener should do a time consuming operation, off-load the operation to another thread. otherwise it will slow down the system.

Warning 2: Do not make a call to hazelcast. It can cause deadlock.

See Also
Cluster::addMembershipListener(InitialMembershipListener *listener)
MembershipEvent::getMembers()

Member Function Documentation

virtual void hazelcast::client::InitialMembershipListener::init ( const InitialMembershipEvent event)
pure virtual

Is called when this listener is registered.

Parameters
eventthe InitialMembershipEvent
virtual void hazelcast::client::InitialMembershipListener::memberAdded ( const MembershipEvent membershipEvent)
pure virtual

Invoked when a new member is added to the cluster.

Parameters
membershipEventmembership event
virtual void hazelcast::client::InitialMembershipListener::memberAttributeChanged ( const MemberAttributeEvent memberAttributeEvent)
pure virtual

Invoked when an attribute of a member was changed.

Parameters
memberAttributeEventmember attribute event
virtual void hazelcast::client::InitialMembershipListener::memberRemoved ( const MembershipEvent membershipEvent)
pure virtual

Invoked when an existing member leaves the cluster.

Parameters
membershipEventmembership event

The documentation for this class was generated from the following files: