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

Public Member Functions

 __construct ()
 
 connect (ClientConfiguration $config)
 
 disconnect ()
 
 createCache (string $name, CacheConfiguration $cacheConfig=null)
 
 getOrCreateCache (string $name, CacheConfiguration $cacheConfig=null)
 
 getCache (string $name)
 
 destroyCache (string $name)
 
 getCacheConfiguration (string $name)
 
 cacheNames ()
 
 setDebug (bool $value)
 

Detailed Description

Class representing Ignite client.

Constructor & Destructor Documentation

◆ __construct()

Apache\Ignite\Client::__construct ( )

Public Client constructor.

Member Function Documentation

◆ cacheNames()

Apache\Ignite\Client::cacheNames ( )

Gets existing cache names.

Returns
array array with the existing cache names. The array is empty if no caches exist.
Exceptions
ClientExceptionif error.

◆ connect()

Apache\Ignite\Client::connect ( ClientConfiguration  $config)

Connects the client.

Reconnects if the client already connected.

Parameters
ClientConfiguration$configthe client configuration.
Exceptions
ClientExceptionif error.

◆ createCache()

Apache\Ignite\Client::createCache ( string  $name,
CacheConfiguration  $cacheConfig = null 
)

Creates new cache with the provided name and optional configuration.

Parameters
string$namecache name.
CacheConfiguration$cacheConfigoptional cache configuration.
Returns
CacheInterface new instance of the class with interface representing the created cache.
Exceptions
ClientExceptionif error.

◆ destroyCache()

Apache\Ignite\Client::destroyCache ( string  $name)

Destroys cache with the provided name.

Parameters
string$namecache name.
Exceptions
ClientExceptionif error.

◆ disconnect()

Apache\Ignite\Client::disconnect ( )

Disconnects the client.

Does nothing if the client already disconnected.

◆ getCache()

Apache\Ignite\Client::getCache ( string  $name)

Gets instance of the class with interface representing the cache with the provided name. The method does not check if the cache with the provided name exists.

Parameters
string$namecache name.
Returns
CacheInterface new instance of the class with interface representing the cache.
Exceptions
ClientExceptionif error.

◆ getCacheConfiguration()

Apache\Ignite\Client::getCacheConfiguration ( string  $name)

Returns configuration of cache with the provided name.

Parameters
string$namecache name.
Returns
CacheConfiguration cache configuration.
Exceptions
ClientExceptionif error.

◆ getOrCreateCache()

Apache\Ignite\Client::getOrCreateCache ( string  $name,
CacheConfiguration  $cacheConfig = null 
)

Gets existing cache with the provided name or creates new one with the provided name and optional configuration.

Parameters
string$namecache name.
CacheConfiguration$cacheConfigcache configuration (ignored if cache with the provided name already exists).
Returns
CacheInterface new instance of the class with interface representing the existing or created cache.
Exceptions
ClientExceptionif error.

◆ setDebug()

Apache\Ignite\Client::setDebug ( bool  $value)

Enables/disables the Ignite client's debug output (including errors logging). Disabled by default.

Parameters
bool$valuetrue to enable, false to disable.

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