Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
cluster.h
1/*
2 * Copyright (c) 2008-2025, Hazelcast, Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include <vector>
19#include <memory>
20
21#include "hazelcast/client/member.h"
22
23namespace hazelcast {
24namespace client {
25namespace spi {
26namespace impl {
27class ClientClusterServiceImpl;
28}
29} // namespace spi
30
32
36class HAZELCAST_API cluster
37{
38public:
42 cluster(spi::impl::ClientClusterServiceImpl& cluster_service);
43
62 boost::uuids::uuid add_membership_listener(membership_listener&& listener);
63
73 bool remove_membership_listener(boost::uuids::uuid registration_id);
74
83 std::vector<member> get_members();
84
85private:
86 spi::impl::ClientClusterServiceImpl& cluster_service_;
87};
88} // namespace client
89} // namespace hazelcast
cluster(spi::impl::ClientClusterServiceImpl &cluster_service)
Constructor.
Definition cluster.cpp:34
std::vector< member > get_members()
Set of current members of the cluster.
Definition cluster.cpp:39
bool remove_membership_listener(boost::uuids::uuid registration_id)
Removes the specified membership_listener.
Definition cluster.cpp:51
boost::uuids::uuid add_membership_listener(membership_listener &&listener)
Adds membership_listener to listen for membership updates.
Definition cluster.cpp:45