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< Member > | getMembers () |
Set of current members of the cluster. More... | |
Hazelcast cluster interface.
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.
listener | InitialMembershipListener |
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.
listener | MembershipListener |
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.
bool hazelcast::client::Cluster::removeMembershipListener | ( | InitialMembershipListener * | listener | ) |
Removes the specified membership listener.
listener | InitialMembershipListener * to be removed |
bool hazelcast::client::Cluster::removeMembershipListener | ( | MembershipListener * | listener | ) |
Removes the specified membership listener.
listener | MembershipListener * to be removed |