PHP Client for Apache Ignite
Public Member Functions | List of all members
Apache\Ignite\ClientConfiguration Class Reference

Public Member Functions

 __construct (string ... $endpoints)
 
 getEndpoints ()
 
 setUserName (?string $userName)
 
 getUserName ()
 
 setPassword (?string $password)
 
 getPassword ()
 
 setTLSOptions (?array $tlsOptions)
 
 getTLSOptions ()
 
 setTimeout (int $timeout)
 
 getTimeout ()
 
 setSendChunkSize (int $size)
 
 getSendChunkSize ()
 
 setReceiveChunkSize (int $size)
 
 getReceiveChunkSize ()
 
 setTcpNoDelay (bool $tcpNoDelay)
 
 getTcpNoDelay ()
 

Detailed Description

Class representing Ignite client configuration.

The configuration includes:

Constructor & Destructor Documentation

◆ __construct()

Apache\Ignite\ClientConfiguration::__construct ( string ...  $endpoints)

Creates an instance of Ignite client configuration with the provided mandatory settings and default optional settings.

By default, the client does not use authentication and secure connection.

Parameters
string...$endpoints Ignite node endpoint(s). The client randomly connects/reconnects to one of the specified node.
Exceptions
ClientExceptionif error.

Member Function Documentation

◆ getEndpoints()

Apache\Ignite\ClientConfiguration::getEndpoints ( )

Returns Ignite node endpoints specified in the constructor.

Returns
string[] endpoints

◆ getPassword()

Apache\Ignite\ClientConfiguration::getPassword ( )

Returns the current password.

Returns
string|null password or null (if password is empty).

◆ getReceiveChunkSize()

Apache\Ignite\ClientConfiguration::getReceiveChunkSize ( )

Returns the current size of the receive chunk.

Returns
int size of the receive chunk (in bytes).

◆ getSendChunkSize()

Apache\Ignite\ClientConfiguration::getSendChunkSize ( )

Returns the current size of the send chunk.

Returns
int size of the send chunk (in bytes).

◆ getTcpNoDelay()

Apache\Ignite\ClientConfiguration::getTcpNoDelay ( )

Returns the current status of the TCP Nagle algorithm.

Returns
bool true if enabled, false if disabled.

◆ getTimeout()

Apache\Ignite\ClientConfiguration::getTimeout ( )

Returns the current send/receive timeout.

Returns
int send/receive timeout (in milliseconds).

◆ getTLSOptions()

Apache\Ignite\ClientConfiguration::getTLSOptions ( )

Returns the current TLS connection options.

Returns
array|null TLS connection options or null (if secure connection is not used).

◆ getUserName()

Apache\Ignite\ClientConfiguration::getUserName ( )

Returns the current username.

Returns
string|null username or null (if authentication is disabled).

◆ setPassword()

Apache\Ignite\ClientConfiguration::setPassword ( ?string  $password)

Sets password which will be used for authentication during the client's connection.

Password is ignored, if username is not set. If password is not set, it is considered empty.

Parameters
string | null$passwordpassword. If null, password is empty.
Returns
ClientConfiguration the same instance of the ClientConfiguration.

◆ setReceiveChunkSize()

Apache\Ignite\ClientConfiguration::setReceiveChunkSize ( int  $size)

Sets the size of the receive chunk.

8192 bytes by default.

Parameters
int$sizesize of the receive chunk (in bytes).
Returns
ClientConfiguration the same instance of the ClientConfiguration.

◆ setSendChunkSize()

Apache\Ignite\ClientConfiguration::setSendChunkSize ( int  $size)

Sets the size of the send chunk.

8192 bytes by default.

Parameters
int$sizesize of the send chunk (in bytes).
Returns
ClientConfiguration the same instance of the ClientConfiguration.

◆ setTcpNoDelay()

Apache\Ignite\ClientConfiguration::setTcpNoDelay ( bool  $tcpNoDelay)

Disables/enables the TCP Nagle algorithm.

Enabled by default.

Parameters
bool$tcpNoDelaytrue to enable, false to disable.
Returns
ClientConfiguration the same instance of the ClientConfiguration.

◆ setTimeout()

Apache\Ignite\ClientConfiguration::setTimeout ( int  $timeout)

Sets send/receive timeout.

Default value is defined by the PHP settings.

Parameters
int$timeoutsend/receive timeout (in milliseconds).
Returns
ClientConfiguration the same instance of the ClientConfiguration.

◆ setTLSOptions()

Apache\Ignite\ClientConfiguration::setTLSOptions ( ?array  $tlsOptions)

Enables and setup TLS connection.

If not enabled (by default), the client does not use secure connection.

Parameters
array | null$tlsOptionsTLS connection options in the format defined here: http://php.net/manual/en/context.ssl.php If null, secure connection is not used.
Returns
ClientConfiguration the same instance of the ClientConfiguration.

◆ setUserName()

Apache\Ignite\ClientConfiguration::setUserName ( ?string  $userName)

Sets username which will be used for authentication during the client's connection.

If username is not set, the client does not use authentication during connection.

Parameters
string | null$userNameusername. If null, authentication is disabled.
Returns
ClientConfiguration the same instance of the ClientConfiguration.

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