Hazelcast C++ Client
Hazelcast C++ Client Library
initial_membership_event.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 
17 
18 
19 #pragma once
20 
21 #include <vector>
22 #include <unordered_set>
23 #include <memory>
24 
25 #include "hazelcast/client/member.h"
26 
27 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
28 #pragma warning(push)
29 #pragma warning(disable: 4251) //for dll export
30 #endif
31 
32 namespace hazelcast {
33  namespace client {
34  class cluster;
35 
42  class HAZELCAST_API initial_membership_event {
43  public:
44  initial_membership_event(cluster &cluster, std::unordered_set<member> members);
45 
52  const std::unordered_set<member> &get_members() const;
53 
59  cluster &get_cluster();
60 
61  private:
62  cluster &cluster_;
63  std::unordered_set<member> members_;
64  };
65 
66  }
67 }
68 
69 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
70 #pragma warning(pop)
71 #endif
72 
73 
74 
Hazelcast cluster interface.
Definition: cluster.h:36
A event that is sent when a MembershipListener is registered.