GridGain C++
ignite_cluster.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_IGNITE_CLUSTER
23 #define _IGNITE_CLUSTER_IGNITE_CLUSTER
24 
26 
27 #include <ignite/impl/cluster/ignite_cluster_impl.h>
28 
29 namespace ignite
30 {
31  namespace cluster
32  {
38  class IGNITE_IMPORT_EXPORT IgniteCluster
39  {
40  public:
46  IgniteCluster(common::concurrent::SharedPointer<ignite::impl::cluster::IgniteClusterImpl> impl);
47 
53  bool IsActive();
54 
61  void SetActive(bool active);
62 
68  void DisableWal(std::string cacheName);
69 
75  void EnableWal(std::string cacheName);
76 
84  bool IsWalEnabled(std::string cacheName);
85 
91  cluster::ClusterGroup ForLocal();
92 
98  cluster::ClusterNode GetLocalNode();
99 
106  void SetBaselineTopologyVersion(int64_t topVer);
107 
113  void SetTxTimeoutOnPartitionMapExchange(int64_t timeout);
114 
121  bool PingNode(Guid nid);
122 
129  std::vector<ClusterNode> GetTopology(int64_t version);
130 
136  int64_t GetTopologyVersion();
137 
143  ClusterGroup AsClusterGroup();
144 
145  private:
146  common::concurrent::SharedPointer<ignite::impl::cluster::IgniteClusterImpl> impl;
147  };
148  }
149 }
150 
151 #endif //_IGNITE_CLUSTER_IGNITE_CLUSTER
ignite
Ignite API.
Definition: cache.h:47
ignite::Guid
Global universally unique identifier (GUID).
Definition: guid.h:35
cluster_group.h
ignite::cluster::ClusterGroup
Defines a cluster group which contains all or a subset of cluster nodes.
Definition: cluster_group.h:44
ignite::cluster::IgniteCluster
Represents whole cluster (all available nodes).
Definition: ignite_cluster.h:38
ignite::cluster::ClusterNode
Interface representing a single cluster node.
Definition: cluster_node.h:35