Apache Ignite C++
ignite_cluster.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_IGNITE_CLUSTER
24 #define _IGNITE_CLUSTER_IGNITE_CLUSTER
25 
27 
28 #include <ignite/impl/cluster/ignite_cluster_impl.h>
29 
30 namespace ignite
31 {
32  namespace cluster
33  {
39  class IGNITE_IMPORT_EXPORT IgniteCluster
40  {
41  public:
47  IgniteCluster(common::concurrent::SharedPointer<ignite::impl::cluster::IgniteClusterImpl> impl);
48 
54  bool IsActive();
55 
62  void SetActive(bool active);
63 
69  void DisableWal(std::string cacheName);
70 
76  void EnableWal(std::string cacheName);
77 
85  bool IsWalEnabled(std::string cacheName);
86 
92  cluster::ClusterGroup ForLocal();
93 
99  cluster::ClusterNode GetLocalNode();
100 
107  void SetBaselineTopologyVersion(int64_t topVer);
108 
114  void SetTxTimeoutOnPartitionMapExchange(int64_t timeout);
115 
122  bool PingNode(Guid nid);
123 
130  std::vector<ClusterNode> GetTopology(int64_t version);
131 
137  int64_t GetTopologyVersion();
138 
144  ClusterGroup AsClusterGroup();
145 
146  private:
147  common::concurrent::SharedPointer<ignite::impl::cluster::IgniteClusterImpl> impl;
148  };
149  }
150 }
151 
152 #endif //_IGNITE_CLUSTER_IGNITE_CLUSTER
ignite
Apache Ignite API.
Definition: cache.h:48
ignite::Guid
Global universally unique identifier (GUID).
Definition: guid.h:36
cluster_group.h
ignite::cluster::ClusterGroup
Defines a cluster group which contains all or a subset of cluster nodes.
Definition: cluster_group.h:45
ignite::cluster::IgniteCluster
Represents whole cluster (all available nodes).
Definition: ignite_cluster.h:39
ignite::cluster::ClusterNode
Interface representing a single cluster node.
Definition: cluster_node.h:36