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 
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 
95  ClusterGroup ForDataNodes(std::string cacheName);
96 
103  ClusterGroup ForHost(ClusterNode node);
104 
111  ClusterGroup ForHost(std::string hostName);
112 
119  ClusterGroup ForHosts(std::vector<std::string> hostNames);
120 
127  ClusterGroup ForNode(ClusterNode node);
128 
135  ClusterGroup ForNodeId(Guid id);
136 
143  ClusterGroup ForNodeIds(std::vector<Guid> ids);
144 
151  ClusterGroup ForNodes(std::vector<ClusterNode> nodes);
152 
158  ClusterGroup ForOldest();
159 
168  ClusterGroup ForPredicate(IgnitePredicate<ClusterNode>* pred);
169 
175  ClusterGroup ForRandom();
176 
182  ClusterGroup ForRemotes();
183 
189  ClusterGroup ForServers();
190 
196  ClusterGroup ForYoungest();
197 
203  ClusterGroup ForCpp();
204 
212  ClusterNode GetNode();
213 
222  ClusterNode GetNode(Guid nid);
223 
229  std::vector<ClusterNode> GetNodes();
230 
236  IgnitePredicate<ClusterNode>* GetPredicate();
237 
238  private:
239  impl::cluster::SP_ClusterGroupImpl impl;
240  impl::cluster::SP_ClusterGroupImpl GetImpl();
241  };
242  }
243 }
244 
245 #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