Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
Cluster.h
1 /*
2  * Copyright (c) 2008-2015, 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 
20 
21 #ifndef HAZElCAST_CLUSTER
22 #define HAZElCAST_CLUSTER
23 
24 #include "hazelcast/client/Member.h"
25 #include <vector>
26 
27 namespace hazelcast {
28  namespace client {
29  namespace spi {
30  class ClusterService;
31  }
32 
33  class MembershipListener;
34 
35  class InitialMembershipListener;
36 
40  class HAZELCAST_API Cluster {
41  public:
45  Cluster(spi::ClusterService &clusterService);
46 
57  void addMembershipListener(InitialMembershipListener *listener);
58 
70  void addMembershipListener(MembershipListener *listener);
71 
79  bool removeMembershipListener(InitialMembershipListener *listener);
80 
88  bool removeMembershipListener(MembershipListener *listener);
89 
98  std::vector<Member> getMembers();
99 
100  private:
101  spi::ClusterService &clusterService;
102  };
103  }
104 }
105 
106 #endif //HAZElCAST_CLUSTER
107 
Cluster membership listener.
Definition: MembershipListener.h:51
Hazelcast cluster interface.
Definition: Cluster.h:40
The InitializingMembershipListener is a MembershipListener that will first receives a InitialMembersh...
Definition: InitialMembershipListener.h:50