Hazelcast C++ Client
Cluster.h
1 /*
2  * Copyright (c) 2008-2017, 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 // Created by sancar koyunlu on 5/31/13.
18 
19 #ifndef HAZElCAST_CLUSTER
20 #define HAZElCAST_CLUSTER
21 
22 #include "hazelcast/client/Member.h"
23 #include <vector>
24 
25 namespace hazelcast {
26  namespace client {
27  namespace spi {
28  class ClusterService;
29  }
30 
31  class MembershipListener;
32 
33  class InitialMembershipListener;
34 
38  class HAZELCAST_API Cluster {
39  public:
43  Cluster(spi::ClusterService &clusterService);
44 
55  void addMembershipListener(InitialMembershipListener *listener);
56 
68  void addMembershipListener(MembershipListener *listener);
69 
77  bool removeMembershipListener(InitialMembershipListener *listener);
78 
86  bool removeMembershipListener(MembershipListener *listener);
87 
96  std::vector<Member> getMembers();
97 
98  private:
99  spi::ClusterService &clusterService;
100  };
101  }
102 }
103 
104 #endif //HAZElCAST_CLUSTER
105 
Cluster membership listener.
Definition: MembershipListener.h:51
Hazelcast cluster interface.
Definition: Cluster.h:38
The InitializingMembershipListener is a MembershipListener that will first receives a InitialMembersh...
Definition: InitialMembershipListener.h:50
Definition: MapEntryView.h:32