GridGain C++
cluster_group.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 GridGain Systems, Inc. and Contributors.
3  *
4  * Licensed under the GridGain Community Edition License (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  * https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
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 
22 #ifndef _IGNITE_CLUSTER_CLUSTER_GROUP
23 #define _IGNITE_CLUSTER_CLUSTER_GROUP
24 
26 
27 #include <ignite/impl/cluster/cluster_group_impl.h>
28 
29 namespace ignite
30 {
31  namespace impl
32  {
33  class IgniteImpl;
34  }
35 
36  namespace cluster
37  {
44  class IGNITE_IMPORT_EXPORT ClusterGroup
45  {
46  friend class impl::cluster::ClusterGroupImpl;
47  friend class impl::IgniteImpl;
48  public:
54  ClusterGroup(impl::cluster::SP_ClusterGroupImpl impl);
55 
63  ClusterGroup ForAttribute(std::string name, std::string val);
64 
71  ClusterGroup ForCacheNodes(std::string cacheName);
72 
79  ClusterGroup ForClientNodes(std::string cacheName);
80 
86  ClusterGroup ForClients();
87 
93  ClusterGroup ForDaemons();
94 
101  ClusterGroup ForDataNodes(std::string cacheName);
102 
109  ClusterGroup ForHost(ClusterNode node);
110 
117  ClusterGroup ForHost(std::string hostName);
118 
125  ClusterGroup ForHosts(std::vector<std::string> hostNames);
126 
133  ClusterGroup ForNode(ClusterNode node);
134 
141  ClusterGroup ForNodeId(Guid id);
142 
149  ClusterGroup ForNodeIds(std::vector<Guid> ids);
150 
157  ClusterGroup ForNodes(std::vector<ClusterNode> nodes);
158 
164  ClusterGroup ForOldest();
165 
174  ClusterGroup ForPredicate(IgnitePredicate<ClusterNode>* pred);
175 
181  ClusterGroup ForRandom();
182 
188  ClusterGroup ForRemotes();
189 
195  ClusterGroup ForServers();
196 
202  ClusterGroup ForYoungest();
203 
209  ClusterGroup ForCpp();
210 
218  ClusterNode GetNode();
219 
228  ClusterNode GetNode(Guid nid);
229 
235  std::vector<ClusterNode> GetNodes();
236 
242  IgnitePredicate<ClusterNode>* GetPredicate();
243 
244  private:
245  impl::cluster::SP_ClusterGroupImpl impl;
246  impl::cluster::SP_ClusterGroupImpl GetImpl();
247  };
248  }
249 }
250 
251 #endif //_IGNITE_CLUSTER_CLUSTER_GROUP
ignite
Ignite API.
Definition: cache.h:47
ignite::Guid
Global universally unique identifier (GUID).
Definition: guid.h:35
cluster_node.h
ignite::cluster::ClusterGroup
Defines a cluster group which contains all or a subset of cluster nodes.
Definition: cluster_group.h:44
ignite::IgnitePredicate
IgnitePredicate base class.
Definition: ignite_predicate.h:33
ignite::cluster::ClusterNode
Interface representing a single cluster node.
Definition: cluster_node.h:35