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

Hazelcast cluster interface. More...

#include <Cluster.h>

Public Member Functions

 Cluster (spi::ClusterService &clusterService)
 Constructor.
 
void addMembershipListener (InitialMembershipListener *listener)
 Adds InitialMembershipListener to listen for membership updates. More...
 
void addMembershipListener (MembershipListener *listener)
 Adds InitialMembershipListener to listen for membership updates. More...
 
bool removeMembershipListener (InitialMembershipListener *listener)
 Removes the specified membership listener. More...
 
bool removeMembershipListener (MembershipListener *listener)
 Removes the specified membership listener. More...
 
std::vector< MembergetMembers ()
 Set of current members of the cluster. More...
 

Detailed Description

Hazelcast cluster interface.

Member Function Documentation

void hazelcast::client::Cluster::addMembershipListener ( InitialMembershipListener listener)

Adds InitialMembershipListener to listen for membership updates.

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.

Parameters
listenerInitialMembershipListener
void hazelcast::client::Cluster::addMembershipListener ( MembershipListener listener)

Adds InitialMembershipListener to listen for membership updates.

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.

Parameters
listenerMembershipListener
std::vector< Member > hazelcast::client::Cluster::getMembers ( )

Set of current members of the cluster.

Returning set instance is not modifiable. Every member in the cluster has the same member list in the same order. First member is the oldest member.

Returns
current members of the cluster
bool hazelcast::client::Cluster::removeMembershipListener ( InitialMembershipListener listener)

Removes the specified membership listener.

Parameters
listenerInitialMembershipListener * to be removed
Returns
true if registration is removed, false otherwise
bool hazelcast::client::Cluster::removeMembershipListener ( MembershipListener listener)

Removes the specified membership listener.

Parameters
listenerMembershipListener * to be removed
Returns
true if registration is removed, false otherwise

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