Hazelcast C++ Client
Hazelcast C++ Client Library
cluster.h
1 /*
2  * Copyright (c) 2008-2022, 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 
23 namespace hazelcast {
24 namespace client {
25 namespace spi {
26 namespace impl {
27 class ClientClusterServiceImpl;
28 }
29 } // namespace spi
30 
31 class membership_listener;
32 
36 class HAZELCAST_API cluster
37 {
38 public:
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 
85 private:
86  spi::impl::ClientClusterServiceImpl& cluster_service_;
87 };
88 } // namespace client
89 } // namespace hazelcast
Hazelcast cluster interface.
Definition: cluster.h:37