| Apache Ignite C++

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

Interface representing a single cluster node. More...

`#include <cluster_node.h>`

## Public Member Functions
| ClusterNode (common::concurrent::SharedPointer< ignite::impl::cluster::ClusterNodeImpl > impl)
| Constructor. More...
const std::vector< std::string > & | GetAddresses () const
| Get collection of addresses this node is known by. More...
bool | IsAttributeSet (std::string name) const
| Check if node attribute is set. More...
template<typename T >
T | GetAttribute (std::string name) const
| Get a node attribute. More...
std::vector< std::string > | GetAttributes () const
| Get collection of all Cluster Node attributes names. More...
std::string | GetConsistentId () const
| Get Cluster Node consistent ID. More...
const std::vector< std::string > & | GetHostNames () const
| Get collection of host names this node is known by. More...
Guid | GetId () const
| Get globally unique node ID. More...
bool | IsClient () const
| Check if cluster node started in client mode. More...
bool | IsLocal () const
| Check whether or not this node is a local node. More...
int64_t | GetOrder () const
| Node order within grid topology. More...
const IgniteProductVersion & | GetVersion () const
| Get node version. More...

## Friends
IGNITE_IMPORT_EXPORT bool | operator< (const ClusterNode &lnode, const ClusterNode &rnode)
| Define "less" operator to allow Cluster Node usage as STL container key. More...

## Detailed Description

Interface representing a single cluster node.

Use GetAttribute(String) or GetMetrics() to get static and dynamic information about cluster nodes.

## Constructor & Destructor Documentation

## ◆ ClusterNode()

ignite::cluster::ClusterNode::ClusterNode | ( | common::concurrent::SharedPointer< ignite::impl::cluster::ClusterNodeImpl > | impl | ) |

Constructor.

Parameters

  impl | Pointer to cluster node implementation.

## Member Function Documentation

## ◆ GetAddresses()

const std::vector< std::string > & ignite::cluster::ClusterNode::GetAddresses | ( |  | ) | const

Get collection of addresses this node is known by.

Returns
  Collection of addresses this node is known by.

## ◆ GetAttribute()

template<typename T >

T ignite::cluster::ClusterNode::GetAttribute | ( | std::string | name | ) | const
| inline

Get a node attribute.

Parameters

  name | Node attribute name.

Returns
  Node attribute.

Exceptions

  IgniteError | in case of attribute name does not exist or if template type is not compatible with attribute.

## ◆ GetAttributes()

std::vector< std::string > ignite::cluster::ClusterNode::GetAttributes | ( |  | ) | const

Get collection of all Cluster Node attributes names.

Returns
  Node attributes names collection.

## ◆ GetConsistentId()

std::string ignite::cluster::ClusterNode::GetConsistentId | ( |  | ) | const

Get Cluster Node consistent ID.

Returns
  Cluster Node consistent ID.

## ◆ GetHostNames()

const std::vector< std::string > & ignite::cluster::ClusterNode::GetHostNames | ( |  | ) | const

Get collection of host names this node is known by.

Returns
  Collection of host names this node is known by.

## ◆ GetId()

Guid ignite::cluster::ClusterNode::GetId | ( |  | ) | const

Get globally unique node ID.

A new ID is generated every time a node restarts

Returns
  Node Guid.

## ◆ GetOrder()

int64_t ignite::cluster::ClusterNode::GetOrder | ( |  | ) | const

Node order within grid topology.

Returns
  Node order.

## ◆ GetVersion()

const IgniteProductVersion & ignite::cluster::ClusterNode::GetVersion | ( |  | ) | const

Get node version.

Returns
  Prodcut version.

## ◆ IsAttributeSet()

bool ignite::cluster::ClusterNode::IsAttributeSet | ( | std::string | name | ) | const

Check if node attribute is set.

Parameters

  name | Node attribute name.

Returns
  True if set.

## ◆ IsClient()

bool ignite::cluster::ClusterNode::IsClient | ( |  | ) | const

Check if cluster node started in client mode.

Returns
  True if in client mode and false otherwise.

## ◆ IsLocal()

bool ignite::cluster::ClusterNode::IsLocal | ( |  | ) | const

Check whether or not this node is a local node.

Returns
  True if is local and false otherwise.

## Friends And Related Function Documentation

## ◆ operator<

IGNITE_IMPORT_EXPORT bool operator< | ( | const ClusterNode & | lnode,
|  | const ClusterNode & | rnode
| ) |  |
| friend

Define "less" operator to allow Cluster Node usage as STL container key.

Parameters

  lnode | Left cluster node.
  rnode | Right cluster node.

Returns
  True if less.

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

- cluster_node.h
- cluster_node.cpp