| 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 cluster
33 {
40 class IGNITE_IMPORT_EXPORT ClusterGroup
41 {
42 friend class impl::cluster::ClusterGroupImpl;
43 public:
49 ClusterGroup(impl::cluster::SP_ClusterGroupImpl impl);
50
58 ClusterGroup ForAttribute(std::string name, std::string val);
59
66 ClusterGroup ForCacheNodes(std::string cacheName);
67
74 ClusterGroup ForClientNodes(std::string cacheName);
75
81 ClusterGroup ForClients();
82
88 ClusterGroup ForDaemons();
89
96 ClusterGroup ForDataNodes(std::string cacheName);
97
104 ClusterGroup ForHost(ClusterNode node);
105
112 ClusterGroup ForHost(std::string hostName);
113
120 ClusterGroup ForHosts(std::vector<std::string> hostNames);
121
128 ClusterGroup ForNode(ClusterNode node);
129
136 ClusterGroup ForNodeId(Guid id);
137
144 ClusterGroup ForNodeIds(std::vector<Guid> ids);
145
152 ClusterGroup ForNodes(std::vector<ClusterNode> nodes);
153
159 ClusterGroup ForOldest();
160
169 ClusterGroup ForPredicate(IgnitePredicate<ClusterNode>* pred);
170
176 ClusterGroup ForRandom();
177
183 ClusterGroup ForRemotes();
184
190 ClusterGroup ForServers();
191
197 ClusterGroup ForYoungest();
198
204 ClusterGroup ForCpp();
205
213 ClusterNode GetNode();
214
223 ClusterNode GetNode(Guid nid);
224
230 std::vector<ClusterNode> GetNodes();
231
237 IgnitePredicate<ClusterNode>* GetPredicate();
238
239 private:
240 impl::cluster::SP_ClusterGroupImpl impl;
241 impl::cluster::SP_ClusterGroupImpl GetImpl();
242 };
243 }
244 }
245
246 #endif //_IGNITE_CLUSTER_CLUSTER_GROUP
ignite::cluster::ClusterGroup
Defines a cluster group which contains all or a subset of cluster nodes.
Definition: cluster_group.h:40
ignite::cluster::ClusterNode
Interface representing a single cluster node.
Definition: cluster_node.h:36
cluster_node.h
Declares ignite::cluster::ClusterNode class.
ignite::Guid
Global universally unique identifier (GUID).
Definition: guid.h:36
ignite::IgnitePredicate
IgnitePredicate base class.
Definition: ignite_predicate.h:34
ignite
Apache Ignite API.
Definition: cache.h:48