Apache Ignite C++
Public Types | Public Member Functions | List of all members
ignite::thin::IgniteClientConfiguration Class Reference

Ignite thin client configuration. More...

#include <ignite_client_configuration.h>

Public Types

enum  { DEFAULT_CONNECTION_TIMEOUT = 20000 }
 Connection operation timeout in milliseconds.
 

Public Member Functions

 IgniteClientConfiguration ()
 Default constructor. More...
 
const std::string & GetEndPoints () const
 Get server end points. More...
 
void SetEndPoints (const std::string &endPoints)
 Set addresses of the remote servers to connect. More...
 
const std::string & GetUser () const
 Get user name used for the authentication. More...
 
void SetUser (const std::string &user)
 Set user name to use for the authentication. More...
 
const std::string & GetPassword () const
 Get password used for the authentication. More...
 
void SetPassword (const std::string &password)
 Set password to use for the authentication. More...
 
SslMode::Type GetSslMode () const
 Get SSL mode. More...
 
void SetSslMode (SslMode::Type sslMode)
 Set SSL mode. More...
 
const std::string & GetSslCertFile () const
 Get file path to SSL certificate to use during connection establishment. More...
 
void SetSslCertFile (const std::string &sslCertFile)
 Set file path to SSL certificate to use during connection establishment. More...
 
const std::string & GetSslKeyFile () const
 Get file path to SSL private key to use during connection establishment. More...
 
void SetSslKeyFile (const std::string &sslKeyFile)
 Set file path to SSL private key to use during connection establishment. More...
 
const std::string & GetSslCaFile () const
 Get file path to SSL certificate authority to authenticate server certificate during connection establishment. More...
 
void SetSslCaFile (const std::string &sslCaFile)
 Set file path to SSL certificate authority to authenticate server certificate during connection establishment. More...
 
void SetPartitionAwareness (bool enable)
 Set Partition Awareness. More...
 
bool IsPartitionAwareness () const
 Get Partition Awareness flag. More...
 
uint32_t GetConnectionsLimit () const
 Get connection limit. More...
 
void SetConnectionsLimit (uint32_t limit)
 Set connection limit. More...
 
int32_t GetConnectionTimeout () const
 Get connection timeout. More...
 
void SetConnectionTimeout (int32_t timeout)
 Set connection timeout. More...
 
void SetUserThreadPoolSize (uint32_t size)
 Set thread pool size. More...
 
uint32_t GetUserThreadPoolSize () const
 Get thread pool size. More...
 

Detailed Description

Ignite thin client configuration.

Used to configure IgniteClient.

Constructor & Destructor Documentation

◆ IgniteClientConfiguration()

ignite::thin::IgniteClientConfiguration::IgniteClientConfiguration ( )
inline

Default constructor.

Constructs configuration with all parameters set to default values.

Member Function Documentation

◆ GetConnectionsLimit()

uint32_t ignite::thin::IgniteClientConfiguration::GetConnectionsLimit ( ) const
inline

Get connection limit.

By default, C++ thin client establishes a connection to every server node listed in endPoints. Use this setting to limit the number of active connections. This reduces initial connection time and the resource usage, but can have a negative effect on cache operation performance, especially if partition awareness is used.

Zero value means that number of active connections is not limited.

The default value is zero.

Returns
Active connection limit.

◆ GetConnectionTimeout()

int32_t ignite::thin::IgniteClientConfiguration::GetConnectionTimeout ( ) const
inline

Get connection timeout.

Used as a timeout for any operation performed over TCP sockets.

Zero value means that there is no timeout.

The default value is DEFAULT_CONNECTION_TIMEOUT.

Returns
Connection timeout in milliseconds.

◆ GetEndPoints()

const std::string& ignite::thin::IgniteClientConfiguration::GetEndPoints ( ) const
inline

Get server end points.

See also
SetEndPoints for format.
Returns
Server end points.

◆ GetPassword()

const std::string& ignite::thin::IgniteClientConfiguration::GetPassword ( ) const
inline

Get password used for the authentication.

Returns
Password.

◆ GetSslCaFile()

const std::string& ignite::thin::IgniteClientConfiguration::GetSslCaFile ( ) const
inline

Get file path to SSL certificate authority to authenticate server certificate during connection establishment.

Returns
File path to SSL certificate authority.

◆ GetSslCertFile()

const std::string& ignite::thin::IgniteClientConfiguration::GetSslCertFile ( ) const
inline

Get file path to SSL certificate to use during connection establishment.

Returns
File path to SSL certificate.

◆ GetSslKeyFile()

const std::string& ignite::thin::IgniteClientConfiguration::GetSslKeyFile ( ) const
inline

Get file path to SSL private key to use during connection establishment.

Returns
File path to SSL private key.

◆ GetSslMode()

SslMode::Type ignite::thin::IgniteClientConfiguration::GetSslMode ( ) const
inline

Get SSL mode.

See also
SslMode for details.
Returns
SSL mode.

◆ GetUser()

const std::string& ignite::thin::IgniteClientConfiguration::GetUser ( ) const
inline

Get user name used for the authentication.

Returns
User name.

◆ GetUserThreadPoolSize()

uint32_t ignite::thin::IgniteClientConfiguration::GetUserThreadPoolSize ( ) const
inline

Get thread pool size.

Returns
Number of threads in user thread pool. Zero means to use number of available core. Default value is 1.

◆ IsPartitionAwareness()

bool ignite::thin::IgniteClientConfiguration::IsPartitionAwareness ( ) const
inline

Get Partition Awareness flag.

See also
SetPartitionAwareness() for details.
Returns
true if partition awareness is enabled and false otherwise.

◆ SetConnectionsLimit()

void ignite::thin::IgniteClientConfiguration::SetConnectionsLimit ( uint32_t  limit)
inline

Set connection limit.

See also
GetConnectionsLimit for details.
Parameters
connectionsLimitConnections limit to set.

◆ SetConnectionTimeout()

void ignite::thin::IgniteClientConfiguration::SetConnectionTimeout ( int32_t  timeout)
inline

Set connection timeout.

See also
GetConnectionTimeout for details.
Parameters
timeoutConnection timeout in milliseconds to set.

◆ SetEndPoints()

void ignite::thin::IgniteClientConfiguration::SetEndPoints ( const std::string &  endPoints)
inline

Set addresses of the remote servers to connect.

The format of the addresses is: <host>[:<port>[..<port_range>]]. If port is not specified, default port is used (10800). You can enlist several hosts separated by comma.

For example: "localhost,example.com:12345,127.0.0.1:10800..10900,192.168.3.80:5893".

Parameters
endPointsAddresses of the remote servers to connect.

◆ SetPartitionAwareness()

void ignite::thin::IgniteClientConfiguration::SetPartitionAwareness ( bool  enable)
inline

Set Partition Awareness.

Enable or disable feature that enables thin client to consider data affinity when making requests to the cluster. It means, thin client is going to connect to all available cluster servers listed by SetEndPoints() method and try to send request to a node which stores related data.

Disabled by default.

Parameters
enableEnable partition awareness.

◆ SetPassword()

void ignite::thin::IgniteClientConfiguration::SetPassword ( const std::string &  password)
inline

Set password to use for the authentication.

Parameters
passwordPassword.

◆ SetSslCaFile()

void ignite::thin::IgniteClientConfiguration::SetSslCaFile ( const std::string &  sslCaFile)
inline

Set file path to SSL certificate authority to authenticate server certificate during connection establishment.

Parameters
sslCaFileFile path to SSL certificate authority.

◆ SetSslCertFile()

void ignite::thin::IgniteClientConfiguration::SetSslCertFile ( const std::string &  sslCertFile)
inline

Set file path to SSL certificate to use during connection establishment.

Parameters
sslCertFileFile path to SSL certificate.

◆ SetSslKeyFile()

void ignite::thin::IgniteClientConfiguration::SetSslKeyFile ( const std::string &  sslKeyFile)
inline

Set file path to SSL private key to use during connection establishment.

Parameters
sslKeyFileFile path to SSL private key.

◆ SetSslMode()

void ignite::thin::IgniteClientConfiguration::SetSslMode ( SslMode::Type  sslMode)
inline

Set SSL mode.

See also
SslMode for details.
Parameters
sslModeSSL mode.

◆ SetUser()

void ignite::thin::IgniteClientConfiguration::SetUser ( const std::string &  user)
inline

Set user name to use for the authentication.

Parameters
userUser name.

◆ SetUserThreadPoolSize()

void ignite::thin::IgniteClientConfiguration::SetUserThreadPoolSize ( uint32_t  size)
inline

Set thread pool size.

Parameters
sizeDesired number of threads in user thread pool. Zero means to use number of available core. Default value is 1.

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