| Apache Ignite C++

Public Member Functions | List of all members
ignite::cluster::IgniteCluster Class Reference

Represents whole cluster (all available nodes). More...

`#include <ignite_cluster.h>`

## Public Member Functions
| IgniteCluster (common::concurrent::SharedPointer< ignite::impl::cluster::IgniteClusterImpl > impl)
| Constructor. More...
bool | IsActive ()
| Check if the Ignite grid is active. More...
void | SetActive (bool active)
| Change Ignite grid state to active or inactive. More...
void | DisableWal (std::string cacheName)
| Disable write-ahead logging for specified cache. More...
void | EnableWal (std::string cacheName)
| Enable write-ahead logging for specified cache. More...
bool | IsWalEnabled (std::string cacheName)
| Check if write - ahead logging is enabled for specified cache. More...
cluster::ClusterGroup | ForLocal ()
| Get a cluster group consisting from the local node. More...
cluster::ClusterNode | GetLocalNode ()
| Get local grid node. More...
void | SetBaselineTopologyVersion (int64_t topVer)
| Set baseline topology constructed from the cluster topology of the given version. More...
void | SetTxTimeoutOnPartitionMapExchange (int64_t timeout)
| Set transaction timeout on partition map exchange. More...
bool | PingNode (Guid nid)
| Ping node. More...
std::vector< ClusterNode > | GetTopology (int64_t version)
| Get a topology by version. More...
int64_t | GetTopologyVersion ()
| Get current topology version. More...
ClusterGroup | AsClusterGroup ()
| Get cluster group consisting of all cluster nodes. More...

## Detailed Description

Represents whole cluster (all available nodes).

Node-local map is useful for saving shared state between job executions on the grid. Additionally you can also ping, start, and restart remote nodes, map keys to caching nodes, and get other useful information about topology.

## Constructor & Destructor Documentation

## ◆ IgniteCluster()

ignite::cluster::IgniteCluster::IgniteCluster | ( | common::concurrent::SharedPointer< ignite::impl::cluster::IgniteClusterImpl > | impl | ) |

Constructor.

Parameters

  impl | Pointer to ignite cluster implementation.

## Member Function Documentation

## ◆ AsClusterGroup()

ClusterGroup ignite::cluster::IgniteCluster::AsClusterGroup | ( |  | ) |

Get cluster group consisting of all cluster nodes.

Returns
  ClusterGroup instance.

## ◆ DisableWal()

void ignite::cluster::IgniteCluster::DisableWal | ( | std::string | cacheName | ) |

Disable write-ahead logging for specified cache.

Parameters

  cacheName | Cache name.

## ◆ EnableWal()

void ignite::cluster::IgniteCluster::EnableWal | ( | std::string | cacheName | ) |

Enable write-ahead logging for specified cache.

Parameters

  cacheName | Cache name.

## ◆ ForLocal()

ClusterGroup ignite::cluster::IgniteCluster::ForLocal | ( |  | ) |

Get a cluster group consisting from the local node.

Returns
  Cluster group consisting from the local node.

## ◆ GetLocalNode()

ClusterNode ignite::cluster::IgniteCluster::GetLocalNode | ( |  | ) |

Get local grid node.

Returns
  Local node.

## ◆ GetTopology()

std::vector< ClusterNode > ignite::cluster::IgniteCluster::GetTopology | ( | int64_t | version | ) |

Get a topology by version.

Parameters

  version | Topology version.

Returns
  Nodes collection for the requested topology version.

## ◆ GetTopologyVersion()

int64_t ignite::cluster::IgniteCluster::GetTopologyVersion | ( |  | ) |

Get current topology version.

Returns
  Current topology version.

## ◆ IsActive()

bool ignite::cluster::IgniteCluster::IsActive | ( |  | ) |

Check if the Ignite grid is active.

Returns
  True if grid is active and false otherwise.

## ◆ IsWalEnabled()

bool ignite::cluster::IgniteCluster::IsWalEnabled | ( | std::string | cacheName | ) |

Check if write - ahead logging is enabled for specified cache.

Parameters

  cacheName | Cache name.

Returns
  True if enabled.

## ◆ PingNode()

bool ignite::cluster::IgniteCluster::PingNode | ( | Guid | nid | ) |

Ping node.

Parameters

  nid | Cluster node ID.

Returns
  True in case of success.

## ◆ SetActive()

void ignite::cluster::IgniteCluster::SetActive | ( | bool | active | ) |

Change Ignite grid state to active or inactive.

Parameters

  active | If true start activation process. If false start deactivation process.

## ◆ SetBaselineTopologyVersion()

void ignite::cluster::IgniteCluster::SetBaselineTopologyVersion | ( | int64_t | topVer | ) |

Set baseline topology constructed from the cluster topology of the given version.

The method succeeds only if the cluster topology has not changed.

Parameters

  topVer | Topology version.

## ◆ SetTxTimeoutOnPartitionMapExchange()

void ignite::cluster::IgniteCluster::SetTxTimeoutOnPartitionMapExchange | ( | int64_t | timeout | ) |

Set transaction timeout on partition map exchange.

Parameters

  timeout | Timeout in milliseconds.

The documentation for this class was generated from the following files:

- ignite_cluster.h
- ignite_cluster.cpp