Apache Ignite C++ Client
Loading...
Searching...
No Matches
ignite::ignite_client Class Reference

#include <ignite_client.h>

Public Member Functions

 ignite_client (ignite_client &&)=default
ignite_clientoperator= (ignite_client &&)=default
 ignite_client (const ignite_client &)=delete
ignite_clientoperator= (const ignite_client &)=delete
IGNITE_API const ignite_client_configurationconfiguration () const noexcept
IGNITE_API tables get_tables () const noexcept
IGNITE_API sql get_sql () const noexcept
IGNITE_API compute get_compute () const noexcept
IGNITE_API transactions get_transactions () const noexcept
IGNITE_API void get_cluster_nodes_async (ignite_callback< std::vector< cluster_node > > callback)
IGNITE_API std::vector< cluster_nodeget_cluster_nodes ()

Static Public Member Functions

static IGNITE_API void start_async (ignite_client_configuration configuration, std::chrono::milliseconds timeout, ignite_callback< ignite_client > callback)
static IGNITE_API ignite_client start (ignite_client_configuration configuration, std::chrono::milliseconds timeout)

Detailed Description

Ignite client.

Member Function Documentation

◆ configuration()

const ignite_client_configuration & ignite::ignite_client::configuration ( ) const
nodiscardnoexcept

Gets client configuration.

Returns
Configuration.

◆ get_cluster_nodes()

std::vector< cluster_node > ignite::ignite_client::get_cluster_nodes ( )
nodiscard

Gets the cluster nodes. NOTE: Temporary API to enable Compute until we have proper Cluster API.

Returns
The list of cluster nodes upon success.

◆ get_cluster_nodes_async()

void ignite::ignite_client::get_cluster_nodes_async ( ignite_callback< std::vector< cluster_node > > callback)

Gets the cluster nodes asynchronously. NOTE: Temporary API to enable Compute until we have proper Cluster API.

Parameters
callbackCallback called with the list of cluster nodes upon success.

◆ get_compute()

compute ignite::ignite_client::get_compute ( ) const
nodiscardnoexcept

Gets the Compute API.

Returns
Compute API.

◆ get_sql()

sql ignite::ignite_client::get_sql ( ) const
nodiscardnoexcept

Gets the SQL API.

Returns
SQL API.

◆ get_tables()

tables ignite::ignite_client::get_tables ( ) const
nodiscardnoexcept

Gets the table API.

Returns
Table API.

◆ get_transactions()

transactions ignite::ignite_client::get_transactions ( ) const
nodiscardnoexcept

Gets the Transactions API.

Returns
Transactions API.

◆ start()

ignite_client ignite::ignite_client::start ( ignite_client_configuration configuration,
std::chrono::milliseconds timeout )
staticnodiscard

Starts a client synchronously.

See also
start_async for details.
Parameters
configurationClient configuration.
timeoutOperation timeout.
Returns
ignite_client instance.

◆ start_async()

void ignite::ignite_client::start_async ( ignite_client_configuration configuration,
std::chrono::milliseconds timeout,
ignite_callback< ignite_client > callback )
static

Starts a client asynchronously.

Client tries to establish connection to every endpoint. At first, an endpoint is selected randomly. After that, round-robin is used to determine the next address to establish connection to.

System means are used to resolve endpoint IP addresses. If more than one IP address is returned, the client attempts to connect to them in random order.

Only one connection establishment can be in process at the same time.

Client considered connected to a cluster when there is at least one connection to any node of the cluster. Upon this event, a callback will be called with a usable ignite_client instance.

Parameters
configurationClient configuration.
timeoutOperation timeout.
callbackCallback to be called once the operation is complete.

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