Apache Ignite.NET
Apache.Ignite.Core.IIgnite Interface Reference

Main entry point for all Ignite APIs. You can obtain an instance of IGrid through Ignition.GetIgnite(), or for named grids you can use Ignition.GetIgnite(string). Note that you can have multiple instances of IGrid running in the same process by giving each instance a different name. All members are thread-safe and may be used concurrently from multiple threads. More...

Inheritance diagram for Apache.Ignite.Core.IIgnite:

Public Member Functions

ICluster GetCluster ()
 Gets an instance of ICluster interface. More...
 
ICompute GetCompute ()
 Gets compute functionality over this grid projection. All operations on the returned ICompute instance will only include nodes from this projection. More...
 
ICache< TK, TV > GetCache< TK, TV > (string name)
 Gets the cache instance for the given name to work with keys and values of specified types. You can get instances of ICache 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 InvalidCastException. Use GetCache<TK,TV> in order to work with entries of arbitrary types. More...
 
ICache< TK, TV > GetOrCreateCache< TK, TV > (string name)
 Gets existing cache with the given name or creates new one using template configuration. More...
 
ICache< TK, TV > GetOrCreateCache< TK, TV > (CacheConfiguration configuration)
 Gets existing cache with the given name or creates new one using provided configuration. More...
 
ICache< TK, TV > GetOrCreateCache< TK, TV > (CacheConfiguration configuration, NearCacheConfiguration nearConfiguration)
 Gets existing cache with the given name or creates new one using provided configuration. More...
 
ICache< TK, TV > CreateCache< TK, TV > (string name)
 Dynamically starts new cache using template configuration. More...
 
ICache< TK, TV > CreateCache< TK, TV > (CacheConfiguration configuration)
 Dynamically starts new cache using provided configuration. More...
 
ICache< TK, TV > CreateCache< TK, TV > (CacheConfiguration configuration, NearCacheConfiguration nearConfiguration)
 Dynamically starts new cache using provided configuration. More...
 
void DestroyCache (string name)
 Destroys dynamically created (with CreateCache<TK,TV>(string) or GetOrCreateCache<TK,TV>(string)) cache. More...
 
IDataStreamer< TK, TV > GetDataStreamer< TK, TV > (string cacheName)
 Gets a new instance of data streamer associated with given cache name. Data streamer is responsible for loading external data into Ignite. For more information refer to IDataStreamer<K,V> documentation. More...
 
IBinary GetBinary ()
 Gets an instance of IBinary interface. More...
 
ICacheAffinity GetAffinity (string name)
 Gets affinity service to provide information about data partitioning and distribution. More...
 
ITransactions GetTransactions ()
 Gets Ignite transactions facade. More...
 
IMessaging GetMessaging ()
 Gets messaging facade over all cluster nodes. More...
 
IEvents GetEvents ()
 Gets events facade over all cluster nodes. More...
 
IServices GetServices ()
 Gets services facade over all cluster nodes. More...
 
IAtomicLong GetAtomicLong (string name, long initialValue, bool create)
 Gets an atomic long with specified name from cache. Creates new atomic long in cache if it does not exist and create is true. More...
 
IAtomicSequence GetAtomicSequence (string name, long initialValue, bool create)
 Gets an atomic sequence with specified name from cache. Creates new atomic sequence in cache if it does not exist and create is true. More...
 
IAtomicReference< T > GetAtomicReference< T > (string name, T initialValue, bool create)
 Gets an atomic reference with specified name from cache. Creates new atomic reference in cache if it does not exist and create is true. More...
 
IgniteConfiguration GetConfiguration ()
 Gets the configuration of this Ignite instance. More...
 
ICache< TK, TV > CreateNearCache< TK, TV > (string name, NearCacheConfiguration configuration)
 Starts a near cache on local client node if cache with specified was previously started. This method does not work on server nodes. More...
 
ICache< TK, TV > GetOrCreateNearCache< TK, TV > (string name, NearCacheConfiguration configuration)
 Gets existing near cache with the given name or creates a new one. More...
 
ICollection< string > GetCacheNames ()
 Gets the collection of names of currently available caches, or empty collection if there are no caches. Note that null string is a valid cache name. More...
 
GetPlugin< T > (string name)
 Gets the plugin by name. More...
 
void ResetLostPartitions (IEnumerable< string > cacheNames)
 Clears partitions' lost state and moves caches to a normal mode. More...
 
void ResetLostPartitions (params string[] cacheNames)
 Clears partitions' lost state and moves caches to a normal mode. More...
 
ICollection< IMemoryMetricsGetMemoryMetrics ()
 Gets a collection of memory metrics, one for each MemoryConfiguration.MemoryPolicies. More...
 
IMemoryMetrics GetMemoryMetrics (string memoryPolicyName)
 Gets the memory metrics for the specified memory policy. More...
 
void SetActive (bool isActive)
 Changes Ignite grid state to active or inactive. More...
 
bool IsActive ()
 Determines whether this grid is in active state. More...
 
IPersistentStoreMetrics GetPersistentStoreMetrics ()
 Gets the persistent store metrics. More...
 

Properties

string Name [get]
 Gets the name of the grid this Ignite instance (and correspondingly its local node) belongs to. Note that single process can have multiple Ignite instances all belonging to different grids. Grid name allows to indicate to what grid this particular Ignite instance (i.e. Ignite runtime and its local node) belongs to. If default Ignite instance is used, then null is returned. Refer to Ignition documentation for information on how to start named grids. More...
 
ILogger Logger [get]
 Gets the logger. More...
 

Events

EventHandler Stopping
 Occurs when node begins to stop. Node is fully functional at this point. See also: LifecycleEventType.BeforeNodeStop. More...
 
EventHandler Stopped
 Occurs when node has stopped. Node can't be used at this point. See also: LifecycleEventType.AfterNodeStop. More...
 
EventHandler ClientDisconnected
 Occurs when client node disconnects from the cluster. This event can only occur when this instance runs in client mode (IgniteConfiguration.ClientMode). More...
 
EventHandler< ClientReconnectEventArgsClientReconnected
 Occurs when client node reconnects to the cluster. This event can only occur when this instance runs in client mode (IgniteConfiguration.ClientMode). More...
 

Detailed Description

Member Function Documentation

ICache<TK, TV> Apache.Ignite.Core.IIgnite.CreateCache< TK, TV > ( string  name)
Template Parameters
TKCache key type.
TVCache value type.
Parameters
nameCache name.
Returns
Existing or newly created cache.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.CreateCache< TK, TV > ( CacheConfiguration  configuration)
Template Parameters
TKCache key type.
TVCache value type.
Parameters
configurationCache configuration.
Returns
Existing or newly created cache.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.CreateCache< TK, TV > ( CacheConfiguration  configuration,
NearCacheConfiguration  nearConfiguration 
)
Template Parameters
TKCache key type.
TVCache value type.
Parameters
configurationCache configuration.
nearConfigurationNear cache configuration for client.
Returns
Existing or newly created cache.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.CreateNearCache< TK, TV > ( string  name,
NearCacheConfiguration  configuration 
)
Parameters
nameThe name.
configurationThe configuration.
Template Parameters
TKCache key type.
TVCache value type.
Returns
Near cache instance.
void Apache.Ignite.Core.IIgnite.DestroyCache ( string  name)
Parameters
nameThe name of the cache to stop.
ICacheAffinity Apache.Ignite.Core.IIgnite.GetAffinity ( string  name)
Parameters
nameCache name.
Returns
Cache data affinity service.
IAtomicLong Apache.Ignite.Core.IIgnite.GetAtomicLong ( string  name,
long  initialValue,
bool  create 
)
Parameters
nameName of the atomic long.
initialValueInitial value for the atomic long. Ignored if create is false.
createFlag indicating whether atomic long should be created if it does not exist.
Returns
Atomic long instance with specified name, or null if it does not exist and create flag is not set.
Exceptions
IgniteExceptionIf atomic long could not be fetched or created.
IAtomicReference<T> Apache.Ignite.Core.IIgnite.GetAtomicReference< T > ( string  name,
initialValue,
bool  create 
)
Parameters
nameName of the atomic reference.
initialValueInitial value for the atomic reference. Ignored if create is false.
createFlag indicating whether atomic reference should be created if it does not exist.
Returns
Atomic reference instance with specified name, or null if it does not exist and create flag is not set.
Exceptions
IgniteExceptionIf atomic reference could not be fetched or created.
IAtomicSequence Apache.Ignite.Core.IIgnite.GetAtomicSequence ( string  name,
long  initialValue,
bool  create 
)
Parameters
nameName of the atomic sequence.
initialValueInitial value for the atomic sequence. Ignored if create is false.
createFlag indicating whether atomic sequence should be created if it does not exist.
Returns
Atomic sequence instance with specified name, or null if it does not exist and create flag is not set.
Exceptions
IgniteExceptionIf atomic sequence could not be fetched or created.
IBinary Apache.Ignite.Core.IIgnite.GetBinary ( )
Returns
Instance of IBinary interface
ICache<TK, TV> Apache.Ignite.Core.IIgnite.GetCache< TK, TV > ( string  name)
Parameters
nameCache name.
Returns
Cache instance for given name.
Template Parameters
TKCache key type.
TVCache value type.
ICollection<string> Apache.Ignite.Core.IIgnite.GetCacheNames ( )
Returns
Collection of names of currently available caches.
ICluster Apache.Ignite.Core.IIgnite.GetCluster ( )
ICompute Apache.Ignite.Core.IIgnite.GetCompute ( )
Returns
Compute instance over this grid projection.
IgniteConfiguration Apache.Ignite.Core.IIgnite.GetConfiguration ( )
IDataStreamer<TK, TV> Apache.Ignite.Core.IIgnite.GetDataStreamer< TK, TV > ( string  cacheName)
Parameters
cacheNameCache name (null for default cache).
Returns
Data streamer.
IEvents Apache.Ignite.Core.IIgnite.GetEvents ( )
Returns
Events facade over all cluster nodes.
ICollection<IMemoryMetrics> Apache.Ignite.Core.IIgnite.GetMemoryMetrics ( )

Memory metrics should be enabled with MemoryPolicyConfiguration.MetricsEnabled.

IMemoryMetrics Apache.Ignite.Core.IIgnite.GetMemoryMetrics ( string  memoryPolicyName)

To get metrics for the default memory region, use MemoryConfiguration.DefaultMemoryPolicyName.

Parameters
memoryPolicyNameName of the memory policy.
IMessaging Apache.Ignite.Core.IIgnite.GetMessaging ( )
Returns
Messaging instance over all cluster nodes.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.GetOrCreateCache< TK, TV > ( string  name)
Template Parameters
TKCache key type.
TVCache value type.
Parameters
nameCache name.
Returns
Existing or newly created cache.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.GetOrCreateCache< TK, TV > ( CacheConfiguration  configuration)
Template Parameters
TKCache key type.
TVCache value type.
Parameters
configurationCache configuration.
Returns
Existing or newly created cache.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.GetOrCreateCache< TK, TV > ( CacheConfiguration  configuration,
NearCacheConfiguration  nearConfiguration 
)
Template Parameters
TKCache key type.
TVCache value type.
Parameters
configurationCache configuration.

///

Parameters
nearConfigurationNear cache configuration for client.
Returns
Existing or newly created cache.
ICache<TK, TV> Apache.Ignite.Core.IIgnite.GetOrCreateNearCache< TK, TV > ( string  name,
NearCacheConfiguration  configuration 
)
Parameters
nameThe name.
configurationThe configuration.
Template Parameters
TKCache key type.
TVCache value type.
Returns
Near cache instance.
IPersistentStoreMetrics Apache.Ignite.Core.IIgnite.GetPersistentStoreMetrics ( )
T Apache.Ignite.Core.IIgnite.GetPlugin< T > ( string  name)
Template Parameters
TPlugin type
Parameters
namePlugin name.
Exceptions
PluginNotFoundExceptionWhen plugin with specified name has not been found.
Returns
Plugin instance.
Type Constraints
T :class 
IServices Apache.Ignite.Core.IIgnite.GetServices ( )
Returns
Services facade over all cluster nodes.
ITransactions Apache.Ignite.Core.IIgnite.GetTransactions ( )
bool Apache.Ignite.Core.IIgnite.IsActive ( )
Returns
true if the grid is active; otherwise, false.
void Apache.Ignite.Core.IIgnite.ResetLostPartitions ( IEnumerable< string >  cacheNames)
Parameters
cacheNamesNames of caches to reset partitions for.
void Apache.Ignite.Core.IIgnite.ResetLostPartitions ( params string[]  cacheNames)
Parameters
cacheNamesNames of caches to reset partitions for.
void Apache.Ignite.Core.IIgnite.SetActive ( bool  isActive)

Property Documentation

ILogger Apache.Ignite.Core.IIgnite.Logger
get

See IgniteConfiguration.Logger for customization.

string Apache.Ignite.Core.IIgnite.Name
get
Returns
Name of the grid, or null for default grid.

Event Documentation

EventHandler Apache.Ignite.Core.IIgnite.ClientDisconnected
EventHandler<ClientReconnectEventArgs> Apache.Ignite.Core.IIgnite.ClientReconnected
EventHandler Apache.Ignite.Core.IIgnite.Stopped
EventHandler Apache.Ignite.Core.IIgnite.Stopping