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.
Namespace: Apache.Ignite.Core.Client
Assembly: Apache.Ignite.Core.dll
Syntax
public interface IIgniteClient
Properties
LocalEndPoint
Gets the current local EndPoint.
Declaration
EndPoint LocalEndPoint { get; }
Property Value
Type | Description |
---|---|
EndPoint |
RemoteEndPoint
Gets the current remote EndPoint.
Declaration
EndPoint RemoteEndPoint { get; }
Property Value
Type | Description |
---|---|
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. |
GetAtomicLong(String, AtomicClientConfiguration, Int64, Boolean)
Gets an atomic long with the specified name.
Creates a new atomic long if it does not exist and create
is true.
Declaration
IAtomicLongClient GetAtomicLong(string name, AtomicClientConfiguration configuration, long initialValue, bool create)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the atomic long. |
AtomicClientConfiguration | configuration | Configuration. |
System.Int64 | initialValue | Initial value for the atomic long. Ignored if |
System.Boolean | create | Flag indicating whether atomic long should be created if it does not exist. |
Returns
Type | Description |
---|---|
IAtomicLongClient | Atomic long instance with the specified name,
or null if it does not exist and |
GetAtomicLong(String, Int64, Boolean)
Gets an atomic long with the specified name.
Creates a new atomic long if it does not exist and create
is true.
Declaration
IAtomicLongClient GetAtomicLong(string name, long initialValue, bool create)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the atomic long. |
System.Int64 | initialValue | Initial value for the atomic long. Ignored if |
System.Boolean | create | Flag indicating whether atomic long should be created if it does not exist. |
Returns
Type | Description |
---|---|
IAtomicLongClient | Atomic long instance with the specified name,
or null if it does not exist and |
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
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 |
---|---|
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 |
---|---|
IEnumerable<IClientConnection> |
GetDataStreamer<TK, TV>(String)
Gets a new instance of the data streamer associated with the given cache name.
Data streamer loads data efficiently into cache. See IDataStreamerClient<TK, TV> for more information.
Declaration
IDataStreamerClient<TK, TV> GetDataStreamer<TK, TV>(string cacheName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Cache name. |
Returns
Type | Description |
---|---|
IDataStreamerClient<TK, TV> | Data streamer. |
Type Parameters
Name | Description |
---|---|
TK | |
TV |
GetDataStreamer<TK, TV>(String, DataStreamerClientOptions)
Gets a new instance of the data streamer associated with the given cache name.
Data streamer loads data efficiently into cache. See IDataStreamerClient<TK, TV> for more information.
Declaration
IDataStreamerClient<TK, TV> GetDataStreamer<TK, TV>(string cacheName, DataStreamerClientOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Cache name. |
DataStreamerClientOptions | options | Data streamer options. |
Returns
Type | Description |
---|---|
IDataStreamerClient<TK, TV> | Data streamer. |
Type Parameters
Name | Description |
---|---|
TK | |
TV |
GetDataStreamer<TK, TV>(String, DataStreamerClientOptions<TK, TV>)
Gets a new instance of the data streamer associated with the given cache name.
Data streamer loads data efficiently into cache. See IDataStreamerClient<TK, TV> for more information.
Declaration
IDataStreamerClient<TK, TV> GetDataStreamer<TK, TV>(string cacheName, DataStreamerClientOptions<TK, TV> options)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | Cache name. |
DataStreamerClientOptions<TK, TV> | options | Data streamer options. |
Returns
Type | Description |
---|---|
IDataStreamerClient<TK, TV> | Data streamer. |
Type Parameters
Name | Description |
---|---|
TK | |
TV |
GetIgniteSet<T>(String, CollectionClientConfiguration)
Gets or creates an Ignite set with the specified name.
Declaration
IIgniteSetClient<T> GetIgniteSet<T>(string name, CollectionClientConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name. |
CollectionClientConfiguration | configuration | Configuration. When null, gets and existing set by name; otherwise, creates a new set with the specified configuration. |
Returns
Type | Description |
---|---|
IIgniteSetClient<T> | Ignite set. |
Type Parameters
Name | Description |
---|---|
T | Element type. |
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 |