Hazelcast C++ Client
Hazelcast C++ Client Library
cluster.h
1 /*
2  * Copyright (c) 2008-2021, 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  }
30 
31  class membership_listener;
32 
36  class HAZELCAST_API cluster {
37  public:
41  cluster(spi::impl::ClientClusterServiceImpl &cluster_service);
42 
59  boost::uuids::uuid add_membership_listener(membership_listener &&listener);
60 
70  bool remove_membership_listener(boost::uuids::uuid registration_id);
71 
80  std::vector<member> get_members();
81 
82  private:
83  spi::impl::ClientClusterServiceImpl &cluster_service_;
84  };
85  }
86 }
87 
88 
89 
Hazelcast cluster interface.
Definition: cluster.h:36