| Apache Ignite C++

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

Main interface to operate with Ignite. More...

`#include <ignite.h>`

## Public Member Functions
| Ignite ()
| Default constructor.
| Ignite (impl::IgniteImpl *impl)
| Constructor.
template<typename K >
cache::CacheAffinity< K > | GetAffinity (const std::string &cacheName)
| Get affinity service to provide information about data partitioning and distribution. More...
const char * | GetName () const
| Get Ignite instance name. More...
const IgniteConfiguration & | GetConfiguration () const
| Get node configuration. More...
template<typename K , typename V >
cache::Cache< K, V > | GetCache (const char *name)
| Get cache. More...
template<typename K , typename V >
cache::Cache< K, V > | GetCache (const char *name, IgniteError &err)
| Get cache. More...
template<typename K , typename V >
cache::Cache< K, V > | GetOrCreateCache (const char *name)
| Get or create cache. More...
template<typename K , typename V >
cache::Cache< K, V > | GetOrCreateCache (const char *name, IgniteError &err)
| Get or create cache. More...
template<typename K , typename V >
cache::Cache< K, V > | CreateCache (const char *name)
| Create cache. More...
template<typename K , typename V >
cache::Cache< K, V > | CreateCache (const char *name, IgniteError &err)
| Create cache. More...
bool | IsActive ()
| Check if the Ignite grid is active. More...
void | SetActive (bool active)
| Change Ignite grid state to active or inactive. More...
transactions::Transactions | GetTransactions ()
| Get transactions. More...
cluster::IgniteCluster | GetCluster ()
| Get cluster. More...
compute::Compute | GetCompute ()
| Gets compute instance over all cluster nodes started in server mode. More...
compute::Compute | GetCompute (cluster::ClusterGroup grp)
| Gets compute instance over the specified cluster group. More...
IgniteBinding | GetBinding ()
| Get ignite binding. More...
bool | IsValid () const
| Check if the instance is valid. More...

## Friends
class | impl::IgniteImpl

## Detailed Description

Main interface to operate with Ignite.

This class is implemented as a reference to an implementation so copying of this class instance will only create another reference to the same underlying object. Underlying object will be released automatically once all the instances are destructed.

## Member Function Documentation

## ◆ CreateCache() [1/2]

template<typename K , typename V >

cache::Cache<K, V> ignite::Ignite::CreateCache | ( | const char * | name | ) |
| inline

Create cache.

This method should only be used on the valid instance.

Parameters

  name | Cache name.

Returns
  Cache.

## ◆ CreateCache() [2/2]

template<typename K , typename V >

cache::Cache<K, V> ignite::Ignite::CreateCache | ( | const char * | name,
|  | IgniteError & | err
| ) |  |
| inline

Create cache.

This method should only be used on the valid instance.

Parameters

  name | Cache name.
  err | Error;

Returns
  Cache.

## ◆ GetAffinity()

template<typename K >

cache::CacheAffinity<K> ignite::Ignite::GetAffinity | ( | const std::string & | cacheName | ) |
| inline

Get affinity service to provide information about data partitioning and distribution.

Template Parameters

  K | Cache affinity key type.

Parameters

  cacheName | Cache name.

Returns
  Cache data affinity service.

## ◆ GetBinding()

IgniteBinding ignite::Ignite::GetBinding | ( |  | ) |

Get ignite binding.

This method should only be used on the valid instance.

Returns
  IgniteBinding class instance.

## ◆ GetCache() [1/2]

template<typename K , typename V >

cache::Cache<K, V> ignite::Ignite::GetCache | ( | const char * | name | ) |
| inline

Get cache.

This method should only be used on the valid instance.

Parameters

  name | Cache name.

Returns
  Cache.

## ◆ GetCache() [2/2]

template<typename K , typename V >

cache::Cache<K, V> ignite::Ignite::GetCache | ( | const char * | name,
|  | IgniteError & | err
| ) |  |
| inline

Get cache.

This method should only be used on the valid instance.

Parameters

  name | Cache name.
  err | Error;

Returns
  Cache.

## ◆ GetCluster()

cluster::IgniteCluster ignite::Ignite::GetCluster | ( |  | ) |

Get cluster.

This method should only be called on the valid instance.

Returns
  Cluster class instance.

## ◆ GetCompute() [1/2]

compute::Compute ignite::Ignite::GetCompute | ( |  | ) |

Gets compute instance over all cluster nodes started in server mode.

This method should only be called on the valid instance.

Returns
  Compute class instance.

## ◆ GetCompute() [2/2]

compute::Compute ignite::Ignite::GetCompute | ( | cluster::ClusterGroup | grp | ) |

Gets compute instance over the specified cluster group.

All operations on the returned compute instance will only include nodes from this cluster group.

This method should only be called on the valid instance.

Parameters

  grp | Specified cluster group instance.

Returns
  Compute class instance over the specified cluster group.

## ◆ GetConfiguration()

const IgniteConfiguration & ignite::Ignite::GetConfiguration | ( |  | ) | const

Get node configuration.

This method should only be used on the valid instance.

Returns
  Node configuration.

## ◆ GetName()

const char * ignite::Ignite::GetName | ( |  | ) | const

Get Ignite instance name.

Returns
  Name.

## ◆ GetOrCreateCache() [1/2]

template<typename K , typename V >

cache::Cache<K, V> ignite::Ignite::GetOrCreateCache | ( | const char * | name | ) |
| inline

Get or create cache.

This method should only be used on the valid instance.

Parameters

  name | Cache name.

Returns
  Cache.

## ◆ GetOrCreateCache() [2/2]

template<typename K , typename V >

cache::Cache<K, V> ignite::Ignite::GetOrCreateCache | ( | const char * | name,
|  | IgniteError & | err
| ) |  |
| inline

Get or create cache.

This method should only be used on the valid instance.

Parameters

  name | Cache name.
  err | Error;

Returns
  Cache.

## ◆ GetTransactions()

transactions::Transactions ignite::Ignite::GetTransactions | ( |  | ) |

Get transactions.

This method should only be used on the valid instance.

Returns
  Transaction class instance.

## ◆ IsActive()

bool ignite::Ignite::IsActive | ( |  | ) |

Check if the Ignite grid is active.

Returns
  True if grid is active and false otherwise.

## ◆ IsValid()

bool ignite::Ignite::IsValid | ( |  | ) | const
| inline

Check if the instance is valid.

Invalid instance can be returned if some of the previous operations have resulted in a failure. For example invalid instance can be returned by not-throwing version of method in case of error. Invalid instances also often can be created using default constructor.

Returns
  True if the instance is valid and can be used.

## ◆ SetActive()

void ignite::Ignite::SetActive | ( | bool | active | ) |

Change Ignite grid state to active or inactive.

Parameters

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

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

- ignite.h
- ignite.cpp