Show / Hide Table of Contents

# Interface IIgniteClient

Main entry point for Ignite Thin Client APIs. You can obtain an instance of IIgniteClient through one of the StartClient() overloads.

Instances of this class and all nested APIs are thread safe.

##### Inherited Members

System.IDisposable.Dispose()

###### Namespace: Apache.Ignite.Core.Client

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public interface IIgniteClient : IDisposable

### Properties

#### LocalEndPoint

Gets the current local EndPoint.

##### Declaration

    EndPoint LocalEndPoint { get; }

##### Property Value

Type | Description
--- | ---
System.Net.EndPoint |

#### RemoteEndPoint

Gets the current remote EndPoint.

##### Declaration

    EndPoint RemoteEndPoint { get; }

##### Property Value

Type | Description
--- | ---
System.Net.EndPoint |

### Methods

#### CreateCache<TK, TV>(CacheClientConfiguration)

Dynamically starts new cache using provided configuration.

##### Declaration

    ICacheClient<TK, TV> CreateCache<TK, TV>(CacheClientConfiguration configuration)

##### Parameters

Type | Name | Description
--- | --- | ---
CacheClientConfiguration | configuration | Cache configuration.

##### Returns

Type | Description
--- | ---
ICacheClient<TK, TV> | Existing or newly created cache.

##### Type Parameters

Name | Description
--- | ---
TK | Cache key type.
TV | Cache value type.

#### CreateCache<TK, TV>(String)

Dynamically starts new cache using template configuration.

##### Declaration

    ICacheClient<TK, TV> CreateCache<TK, TV>(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | name | Cache name.

##### Returns

Type | Description
--- | ---
ICacheClient<TK, TV> | Existing or newly created cache.

##### Type Parameters

Name | Description
--- | ---
TK | Cache key type.
TV | Cache value type.

#### DestroyCache(String)

Destroys dynamically created (with CreateCache<TK, TV>(String) or GetOrCreateCache<TK, TV>(String)) cache.

##### Declaration

    void DestroyCache(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | name | The name of the cache to stop.

#### GetBinary()

Gets Ignite binary services.

##### Declaration

    IBinary GetBinary()

##### Returns

Type | Description
--- | ---
IBinary | Instance of IBinary interface

#### GetCache<TK, TV>(String)

Gets the cache instance for the given name to work with keys and values of specified types.

You can get instances of ICacheClient<TK, TV> of the same name, but with different key/value types. These will use the same named cache, but only allow working with entries of specified types. Attempt to retrieve an entry of incompatible type will result in System.InvalidCastException. Use GetCache<TK, TV>(String) in order to work with entries of arbitrary types.

##### Declaration

    ICacheClient<TK, TV> GetCache<TK, TV>(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | name | Cache name.

##### Returns

Type | Description
--- | ---
ICacheClient<TK, TV> | Cache instance for given name.

##### Type Parameters

Name | Description
--- | ---
TK | Cache key type.
TV | Cache value type.

#### GetCacheNames()

Gets the collection of names of currently available caches, or empty collection if there are no caches.

##### Declaration

    ICollection<string> GetCacheNames()

##### Returns

Type | Description
--- | ---
System.Collections.Generic.ICollection<System.String> | Collection of names of currently available caches.

#### GetCluster()

Gets Ignite cluster.

##### Declaration

    IClientCluster GetCluster()

##### Returns

Type | Description
--- | ---
IClientCluster | Instance of IClientCluster interface.

#### GetCompute()

Gets the compute API.

##### Declaration

    IComputeClient GetCompute()

##### Returns

Type | Description
--- | ---
IComputeClient |

#### GetConfiguration()

Gets the configuration.

##### Declaration

    IgniteClientConfiguration GetConfiguration()

##### Returns

Type | Description
--- | ---
IgniteClientConfiguration |

#### GetConnections()

Gets all active connections. Ignite Thin Client maintains connections to multiple server nodes when EnablePartitionAwareness is true.

##### Declaration

    IEnumerable<IClientConnection> GetConnections()

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IEnumerable<IClientConnection> |

#### GetOrCreateCache<TK, TV>(CacheClientConfiguration)

Gets existing cache with the given name or creates new one using provided configuration.

##### Declaration

    ICacheClient<TK, TV> GetOrCreateCache<TK, TV>(CacheClientConfiguration configuration)

##### Parameters

Type | Name | Description
--- | --- | ---
CacheClientConfiguration | configuration | Cache configuration.

##### Returns

Type | Description
--- | ---
ICacheClient<TK, TV> | Existing or newly created cache.

##### Type Parameters

Name | Description
--- | ---
TK | Cache key type.
TV | Cache value type.

#### GetOrCreateCache<TK, TV>(String)

Gets existing cache with the given name or creates new one using template configuration.

##### Declaration

    ICacheClient<TK, TV> GetOrCreateCache<TK, TV>(string name)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | name | Cache name.

##### Returns

Type | Description
--- | ---
ICacheClient<TK, TV> | Existing or newly created cache.

##### Type Parameters

Name | Description
--- | ---
TK | Cache key type.
TV | Cache value type.

#### GetServices()

Gets the services API.

##### Declaration

    IServicesClient GetServices()

##### Returns

Type | Description
--- | ---
IServicesClient |

#### GetTransactions()

Gets Ignite transactions facade ITransactionsClient.

Transactions are bound to the thread started the transaction. After that, each cache operation within this thread will belong to the corresponding transaction until the transaction is committed, rolled back or closed.

Should not be used with async calls.

##### Declaration

    ITransactionsClient GetTransactions()

##### Returns

Type | Description
--- | ---
ITransactionsClient |