Hazelcast C++ Client
Public Member Functions | Friends | 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>

+ Inheritance diagram for hazelcast::client::InitialMembershipListener:

Public Member Functions

virtual void init (const InitialMembershipEvent &event)=0
 Is called when this listener is registered. More...
 
- Public Member Functions inherited from hazelcast::client::MembershipListener
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...
 

Friends

class spi::impl::ClientClusterServiceImpl
 
class InitialMembershipListenerDelegator
 

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

◆ init()

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

Is called when this listener is registered.

Parameters
eventthe InitialMembershipEvent

Implemented in hazelcast::client::InitialMembershipListenerDelegator.


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