| Apache Ignite C++

cluster_group.h
Go to the documentation of this file.
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
23 #ifndef _IGNITE_CLUSTER_CLUSTER_GROUP
24 #define _IGNITE_CLUSTER_CLUSTER_GROUP
25
26 #include <ignite/cluster/cluster_node.h>
27
28 #include <ignite/impl/cluster/cluster_group_impl.h>
29
30 namespace ignite
31 {
32 namespace impl
33 {
34 class IgniteImpl;
35 }
36
37 namespace cluster
38 {
45 class IGNITE_IMPORT_EXPORT ClusterGroup
46 {
47 friend class impl::cluster::ClusterGroupImpl;
48 friend class impl::IgniteImpl;
49 public:
55 ClusterGroup(impl::cluster::SP_ClusterGroupImpl impl);
56
64 ClusterGroup ForAttribute(std::string name, std::string val);
65
72 ClusterGroup ForCacheNodes(std::string cacheName);
73
80 ClusterGroup ForClientNodes(std::string cacheName);
81
87 ClusterGroup ForClients();
88
94 ClusterGroup ForDaemons();
95
102 ClusterGroup ForDataNodes(std::string cacheName);
103
110 ClusterGroup ForHost(ClusterNode node);
111
118 ClusterGroup ForHost(std::string hostName);
119
126 ClusterGroup ForHosts(std::vector<std::string> hostNames);
127
134 ClusterGroup ForNode(ClusterNode node);
135
142 ClusterGroup ForNodeId(Guid id);
143
150 ClusterGroup ForNodeIds(std::vector<Guid> ids);
151
158 ClusterGroup ForNodes(std::vector<ClusterNode> nodes);
159
165 ClusterGroup ForOldest();
166
175 ClusterGroup ForPredicate(IgnitePredicate<ClusterNode>* pred);
176
182 ClusterGroup ForRandom();
183
189 ClusterGroup ForRemotes();
190
196 ClusterGroup ForServers();
197
203 ClusterGroup ForYoungest();
204
210 ClusterGroup ForCpp();
211
219 ClusterNode GetNode();
220
229 ClusterNode GetNode(Guid nid);
230
236 std::vector<ClusterNode> GetNodes();
237
243 IgnitePredicate<ClusterNode>* GetPredicate();
244
245 private:
246 impl::cluster::SP_ClusterGroupImpl impl;
247 impl::cluster::SP_ClusterGroupImpl GetImpl();
248 };
249 }
250 }
251
252 #endif //_IGNITE_CLUSTER_CLUSTER_GROUP
ignite
Apache Ignite API.
Definition: cache.h:48
ignite::Guid
Global universally unique identifier (GUID).
Definition: guid.h:36
cluster_node.h
ignite::cluster::ClusterGroup
Defines a cluster group which contains all or a subset of cluster nodes.
Definition: cluster_group.h:45
ignite::IgnitePredicate
IgnitePredicate base class.
Definition: ignite_predicate.h:34
ignite::cluster::ClusterNode
Interface representing a single cluster node.
Definition: cluster_node.h:36