Apache Ignite.NET
Apache.Ignite.Core.IgniteConfiguration Class Reference

Grid configuration. More...

Public Member Functions

 IgniteConfiguration ()
 Initializes a new instance of the IgniteConfiguration class. More...
 
 IgniteConfiguration (IgniteConfiguration configuration)
 Initializes a new instance of the IgniteConfiguration class. More...
 
void ToXml (XmlWriter writer, string rootElementName)
 Serializes this instance to the specified XML writer. More...
 
string ToXml ()
 Serializes this instance to an XML string. More...
 

Static Public Member Functions

static IgniteConfiguration FromXml (XmlReader reader)
 Deserializes IgniteConfiguration from the XML reader. More...
 
static IgniteConfiguration FromXml (string xml)
 Deserializes IgniteConfiguration from the XML string. More...
 

Public Attributes

const int DefaultJvmInitMem = -1
 Default initial JVM memory in megabytes. More...
 
const int DefaultJvmMaxMem = -1
 Default maximum JVM memory in megabytes. More...
 
const int DefaultMetricsHistorySize = 10000
 Default metrics history size. More...
 
const int DefaultManagementThreadPoolSize = 4
 Default management thread pool size. More...
 
const int DefaultNetworkSendRetryCount = 3
 Default network retry count. More...
 
const bool DefaultIsLateAffinityAssignment = true
 Default late affinity assignment mode. More...
 
const bool DefaultIsActiveOnStart = true
 Default value for IsActiveOnStart property. More...
 

Static Public Attributes

static readonly TimeSpan DefaultMetricsExpireTime = TimeSpan.MaxValue
 Default metrics expire time. More...
 
static readonly TimeSpan DefaultMetricsLogFrequency = TimeSpan.FromMilliseconds(60000)
 Default metrics log frequency. More...
 
static readonly TimeSpan DefaultMetricsUpdateFrequency = TimeSpan.FromMilliseconds(2000)
 Default metrics update frequency. More...
 
static readonly TimeSpan DefaultNetworkTimeout = TimeSpan.FromMilliseconds(5000)
 Default network timeout. More...
 
static readonly TimeSpan DefaultNetworkSendRetryDelay = TimeSpan.FromMilliseconds(1000)
 Default network retry delay. More...
 
static readonly TimeSpan DefaultFailureDetectionTimeout = TimeSpan.FromSeconds(10)
 Default failure detection timeout. More...
 
static readonly TimeSpan DefaultClientFailureDetectionTimeout = TimeSpan.FromSeconds(30)
 Default failure detection timeout. More...
 
static readonly int DefaultThreadPoolSize = Math.Max(8, Environment.ProcessorCount)
 Default thread pool size. More...
 
static readonly TimeSpan DefaultLongQueryWarningTimeout = TimeSpan.FromMilliseconds(3000)
 Default timeout after which long query warning will be printed. More...
 

Properties

string IgniteInstanceName [get, set]
 Gets or sets optional local instance name. More...
 
bool AutoGenerateIgniteInstanceName [get, set]
 Gets or sets a value indicating whether unique IgniteInstanceName should be generated. More...
 
string GridName [get, set]
 Gets or sets optional local instance name. More...
 
BinaryConfiguration BinaryConfiguration [get, set]
 Gets or sets the binary configuration. More...
 
ICollection< CacheConfigurationCacheConfiguration [get, set]
 Gets or sets the cache configuration. More...
 
string SpringConfigUrl [get, set]
 URL to Spring configuration file. More...
 
string JvmDllPath [get, set]
 Path jvm.dll file. If not set, it's location will be determined using JAVA_HOME environment variable. If path is neither set nor determined automatically, an exception will be thrown. More...
 
string IgniteHome [get, set]
 Path to Ignite home. If not set environment variable IGNITE_HOME will be used. More...
 
string JvmClasspath [get, set]
 Classpath used by JVM on Ignite start. More...
 
ICollection< string > JvmOptions [get, set]
 Collection of options passed to JVM on Ignite start. More...
 
ICollection< string > Assemblies [get, set]
 List of additional .Net assemblies to load on Ignite start. Each item can be either fully qualified assembly name, path to assembly to DLL or path to a directory when assemblies reside. More...
 
bool SuppressWarnings [get, set]
 Whether to suppress warnings. More...
 
ICollection< ILifecycleHandlerLifecycleHandlers [get, set]
 Lifecycle handlers. More...
 
int JvmInitialMemoryMb [get, set]
 Initial amount of memory in megabytes given to JVM. Maps to -Xms Java option. More...
 
int JvmMaxMemoryMb [get, set]
 Maximum amount of memory in megabytes given to JVM. Maps to -Xmx Java option. More...
 
IDiscoverySpi DiscoverySpi [get, set]
 Gets or sets the discovery service provider. Null for default discovery. More...
 
ICommunicationSpi CommunicationSpi [get, set]
 Gets or sets the communication service provider. Null for default communication. More...
 
bool ClientMode [get, set]
 Gets or sets a value indicating whether node should start in client mode. Client node cannot hold data in the caches. More...
 
ICollection< int > IncludedEventTypes [get, set]
 Gets or sets a set of event types (EventType) to be recorded by Ignite. More...
 
TimeSpan MetricsExpireTime [get, set]
 Gets or sets the time after which a certain metric value is considered expired. More...
 
int MetricsHistorySize [get, set]
 Gets or sets the number of metrics kept in history to compute totals and averages. More...
 
TimeSpan MetricsLogFrequency [get, set]
 Gets or sets the frequency of metrics log print out. TimeSpan.Zero to disable metrics print out. More...
 
TimeSpan MetricsUpdateFrequency [get, set]
 Gets or sets the job metrics update frequency. TimeSpan.Zero to update metrics on job start/finish. Negative value to never update metrics. More...
 
int NetworkSendRetryCount [get, set]
 Gets or sets the network send retry count. More...
 
TimeSpan NetworkSendRetryDelay [get, set]
 Gets or sets the network send retry delay. More...
 
TimeSpan NetworkTimeout [get, set]
 Gets or sets the network timeout. More...
 
string WorkDirectory [get, set]
 Gets or sets the work directory. If not provided, a folder under IgniteHome will be used. More...
 
string Localhost [get, set]
 Gets or sets system-wide local address or host for all Ignite components to bind to. If provided it will override all default local bind settings within Ignite. More...
 
bool IsDaemon [get, set]
 Gets or sets a value indicating whether this node should be a daemon node. More...
 
IDictionary< string, object > UserAttributes [get, set]
 Gets or sets the user attributes for this node. More...
 
AtomicConfiguration AtomicConfiguration [get, set]
 Gets or sets the atomic data structures configuration. More...
 
TransactionConfiguration TransactionConfiguration [get, set]
 Gets or sets the transaction configuration. More...
 
bool IsLateAffinityAssignment [get, set]
 Gets or sets a value indicating whether late affinity assignment mode should be used. More...
 
ILogger Logger [get, set]
 Gets or sets the logger. More...
 
TimeSpan FailureDetectionTimeout [get, set]
 Gets or sets the failure detection timeout used by TcpDiscoverySpi and TcpCommunicationSpi. More...
 
TimeSpan ClientFailureDetectionTimeout [get, set]
 Gets or sets the failure detection timeout used by TcpDiscoverySpi and TcpCommunicationSpi for client nodes. More...
 
ICollection< IPluginConfigurationPluginConfigurations [get, set]
 Gets or sets the configurations for plugins to be started. More...
 
IEventStorageSpi EventStorageSpi [get, set]
 Gets or sets the event storage interface. More...
 
MemoryConfiguration MemoryConfiguration [get, set]
 Gets or sets the page memory configuration. MemoryConfiguration for more details. More...
 
PeerAssemblyLoadingMode PeerAssemblyLoadingMode [get, set]
 Gets or sets a value indicating how user assemblies should be loaded on remote nodes. More...
 
int PublicThreadPoolSize [get, set]
 Gets or sets the size of the public thread pool, which processes compute jobs and user messages. More...
 
int StripedThreadPoolSize [get, set]
 Gets or sets the size of the striped thread pool, which processes cache requests. More...
 
int ServiceThreadPoolSize [get, set]
 Gets or sets the size of the service thread pool, which processes Ignite services. More...
 
int SystemThreadPoolSize [get, set]
 Gets or sets the size of the system thread pool, which processes internal system messages. More...
 
int AsyncCallbackThreadPoolSize [get, set]
 Gets or sets the size of the asynchronous callback thread pool. More...
 
int ManagementThreadPoolSize [get, set]
 Gets or sets the size of the management thread pool, which processes internal Ignite jobs. More...
 
int DataStreamerThreadPoolSize [get, set]
 Gets or sets the size of the data streamer thread pool. More...
 
int UtilityCacheThreadPoolSize [get, set]
 Gets or sets the size of the utility cache thread pool. More...
 
int QueryThreadPoolSize [get, set]
 Gets or sets the size of the query thread pool. More...
 
SqlConnectorConfiguration SqlConnectorConfiguration [get, set]
 Gets or sets the SQL connector configuration (for JDBC and ODBC). More...
 
TimeSpan LongQueryWarningTimeout [get, set]
 Gets or sets the timeout after which long query warning will be printed. More...
 
PersistentStoreConfiguration PersistentStoreConfiguration [get, set]
 Gets or sets the persistent store configuration. More...
 
bool IsActiveOnStart [get, set]
 Gets or sets a value indicating whether grid should be active on start. See also IIgnite.IsActive and IIgnite.SetActive. More...
 

Detailed Description

Constructor & Destructor Documentation

Apache.Ignite.Core.IgniteConfiguration.IgniteConfiguration ( )
Apache.Ignite.Core.IgniteConfiguration.IgniteConfiguration ( IgniteConfiguration  configuration)
Parameters
configurationThe configuration to copy.

Member Function Documentation

static IgniteConfiguration Apache.Ignite.Core.IgniteConfiguration.FromXml ( XmlReader  reader)
static
Parameters
readerThe reader.
Returns
Deserialized instance.
static IgniteConfiguration Apache.Ignite.Core.IgniteConfiguration.FromXml ( string  xml)
static
Parameters
xmlXml string.
Returns
Deserialized instance.
void Apache.Ignite.Core.IgniteConfiguration.ToXml ( XmlWriter  writer,
string  rootElementName 
)
Parameters
writerThe writer.
rootElementNameName of the root element.
string Apache.Ignite.Core.IgniteConfiguration.ToXml ( )

Member Data Documentation

readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultClientFailureDetectionTimeout = TimeSpan.FromSeconds(30)
static
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultFailureDetectionTimeout = TimeSpan.FromSeconds(10)
static
const bool Apache.Ignite.Core.IgniteConfiguration.DefaultIsActiveOnStart = true
const bool Apache.Ignite.Core.IgniteConfiguration.DefaultIsLateAffinityAssignment = true
const int Apache.Ignite.Core.IgniteConfiguration.DefaultJvmInitMem = -1
const int Apache.Ignite.Core.IgniteConfiguration.DefaultJvmMaxMem = -1
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultLongQueryWarningTimeout = TimeSpan.FromMilliseconds(3000)
static
const int Apache.Ignite.Core.IgniteConfiguration.DefaultManagementThreadPoolSize = 4
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultMetricsExpireTime = TimeSpan.MaxValue
static
const int Apache.Ignite.Core.IgniteConfiguration.DefaultMetricsHistorySize = 10000
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultMetricsLogFrequency = TimeSpan.FromMilliseconds(60000)
static
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultMetricsUpdateFrequency = TimeSpan.FromMilliseconds(2000)
static
const int Apache.Ignite.Core.IgniteConfiguration.DefaultNetworkSendRetryCount = 3
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultNetworkSendRetryDelay = TimeSpan.FromMilliseconds(1000)
static
readonly TimeSpan Apache.Ignite.Core.IgniteConfiguration.DefaultNetworkTimeout = TimeSpan.FromMilliseconds(5000)
static
readonly int Apache.Ignite.Core.IgniteConfiguration.DefaultThreadPoolSize = Math.Max(8, Environment.ProcessorCount)
static

Property Documentation

ICollection<string> Apache.Ignite.Core.IgniteConfiguration.Assemblies
getset
int Apache.Ignite.Core.IgniteConfiguration.AsyncCallbackThreadPoolSize
getset
AtomicConfiguration Apache.Ignite.Core.IgniteConfiguration.AtomicConfiguration
getset
bool Apache.Ignite.Core.IgniteConfiguration.AutoGenerateIgniteInstanceName
getset

Set this to true in scenarios where new node should be started regardless of other nodes present within current process. In particular, this setting is useful is ASP.NET and IIS environments, where AppDomains are loaded and unloaded within a single process during application restarts. Ignite stops all nodes on AppDomain unload, however, IIS does not wait for previous AppDomain to unload before starting up a new one, which may cause "Ignite instance with this name has already been started" errors. This setting solves the issue.

BinaryConfiguration Apache.Ignite.Core.IgniteConfiguration.BinaryConfiguration
getset

The binary configuration.

ICollection<CacheConfiguration> Apache.Ignite.Core.IgniteConfiguration.CacheConfiguration
getset

The cache configuration.

TimeSpan Apache.Ignite.Core.IgniteConfiguration.ClientFailureDetectionTimeout
getset
bool Apache.Ignite.Core.IgniteConfiguration.ClientMode
getset
ICommunicationSpi Apache.Ignite.Core.IgniteConfiguration.CommunicationSpi
getset
int Apache.Ignite.Core.IgniteConfiguration.DataStreamerThreadPoolSize
getset
IDiscoverySpi Apache.Ignite.Core.IgniteConfiguration.DiscoverySpi
getset
IEventStorageSpi Apache.Ignite.Core.IgniteConfiguration.EventStorageSpi
getset

Only predefined implementations are supported: NoopEventStorageSpi, MemoryEventStorageSpi.

TimeSpan Apache.Ignite.Core.IgniteConfiguration.FailureDetectionTimeout
getset
string Apache.Ignite.Core.IgniteConfiguration.GridName
getset

This name only works locally and has no effect on topology.

This property is used to when there are multiple Ignite nodes in one process to distinguish them.

string Apache.Ignite.Core.IgniteConfiguration.IgniteHome
getset
string Apache.Ignite.Core.IgniteConfiguration.IgniteInstanceName
getset

This name only works locally and has no effect on topology.

This property is used to when there are multiple Ignite nodes in one process to distinguish them.

ICollection<int> Apache.Ignite.Core.IgniteConfiguration.IncludedEventTypes
getset
bool Apache.Ignite.Core.IgniteConfiguration.IsActiveOnStart
getset
bool Apache.Ignite.Core.IgniteConfiguration.IsDaemon
getset

Daemon nodes are the usual grid nodes that participate in topology but not visible on the main APIs, i.e. they are not part of any cluster groups.

Daemon nodes are used primarily for management and monitoring functionality that is built on Ignite and needs to participate in the topology, but also needs to be excluded from the "normal" topology, so that it won't participate in the task execution or in-memory data grid storage.

bool Apache.Ignite.Core.IgniteConfiguration.IsLateAffinityAssignment
getset

On each topology change, for each started cache, partition-to-node mapping is calculated using AffinityFunction for cache. When late affinity assignment mode is disabled then new affinity mapping is applied immediately.

With late affinity assignment mode, if primary node was changed for some partition, but data for this partition is not rebalanced yet on this node, then current primary is not changed and new primary is temporary assigned as backup. This nodes becomes primary only when rebalancing for all assigned primary partitions is finished. This mode can show better performance for cache operations, since when cache primary node executes some operation and data is not rebalanced yet, then it sends additional message to force rebalancing from other nodes.

Note, that ICacheAffinity interface provides assignment information taking late assignment into account, so while rebalancing for new primary nodes is not finished it can return assignment which differs from assignment calculated by AffinityFunction.

This property should have the same value for all nodes in cluster.

If not provided, default value is DefaultIsLateAffinityAssignment.

string Apache.Ignite.Core.IgniteConfiguration.JvmClasspath
getset
string Apache.Ignite.Core.IgniteConfiguration.JvmDllPath
getset
int Apache.Ignite.Core.IgniteConfiguration.JvmInitialMemoryMb
getset

-1 maps to JVM defaults. Defaults to DefaultJvmInitMem.

int Apache.Ignite.Core.IgniteConfiguration.JvmMaxMemoryMb
getset

-1 maps to JVM defaults. Defaults to DefaultJvmMaxMem.

ICollection<string> Apache.Ignite.Core.IgniteConfiguration.JvmOptions
getset
ICollection<ILifecycleHandler> Apache.Ignite.Core.IgniteConfiguration.LifecycleHandlers
getset
string Apache.Ignite.Core.IgniteConfiguration.Localhost
getset

If null then Ignite tries to use local wildcard address.That means that all services will be available on all network interfaces of the host machine.

It is strongly recommended to set this parameter for all production environments.

ILogger Apache.Ignite.Core.IgniteConfiguration.Logger
getset

If no logger is set, logging is delegated to Java, which uses the logger defined in Spring XML (if present) or logs to console otherwise.

TimeSpan Apache.Ignite.Core.IgniteConfiguration.LongQueryWarningTimeout
getset
int Apache.Ignite.Core.IgniteConfiguration.ManagementThreadPoolSize
getset
MemoryConfiguration Apache.Ignite.Core.IgniteConfiguration.MemoryConfiguration
getset
TimeSpan Apache.Ignite.Core.IgniteConfiguration.MetricsExpireTime
getset
int Apache.Ignite.Core.IgniteConfiguration.MetricsHistorySize
getset
TimeSpan Apache.Ignite.Core.IgniteConfiguration.MetricsLogFrequency
getset
TimeSpan Apache.Ignite.Core.IgniteConfiguration.MetricsUpdateFrequency
getset
int Apache.Ignite.Core.IgniteConfiguration.NetworkSendRetryCount
getset
TimeSpan Apache.Ignite.Core.IgniteConfiguration.NetworkSendRetryDelay
getset
TimeSpan Apache.Ignite.Core.IgniteConfiguration.NetworkTimeout
getset
PeerAssemblyLoadingMode Apache.Ignite.Core.IgniteConfiguration.PeerAssemblyLoadingMode
getset

For example, when executing ICompute.Call<TRes>(IComputeFunc<TRes>), the assembly with corresponding IComputeFunc<TRes> should be loaded on remote nodes. With this option enabled, Ignite will attempt to send the assembly to remote nodes and load it there automatically.

Default is Apache.Ignite.Core.Deployment.PeerAssemblyLoadingMode.Disabled.

Peer loading is enabled for ICompute functionality.

PersistentStoreConfiguration Apache.Ignite.Core.IgniteConfiguration.PersistentStoreConfiguration
getset
ICollection<IPluginConfiguration> Apache.Ignite.Core.IgniteConfiguration.PluginConfigurations
getset
int Apache.Ignite.Core.IgniteConfiguration.PublicThreadPoolSize
getset
int Apache.Ignite.Core.IgniteConfiguration.QueryThreadPoolSize
getset
int Apache.Ignite.Core.IgniteConfiguration.ServiceThreadPoolSize
getset
string Apache.Ignite.Core.IgniteConfiguration.SpringConfigUrl
getset

Spring configuration is loaded first, then IgniteConfiguration properties are applied. Null property values do not override Spring values. Value-typed properties are tracked internally: if setter was not called, Spring value won't be overwritten.

This merging happens on the top level only; e. g. if there are cache configurations defined in Spring and in .NET, .NET caches will overwrite Spring caches.

SqlConnectorConfiguration Apache.Ignite.Core.IgniteConfiguration.SqlConnectorConfiguration
getset
int Apache.Ignite.Core.IgniteConfiguration.StripedThreadPoolSize
getset
bool Apache.Ignite.Core.IgniteConfiguration.SuppressWarnings
getset
int Apache.Ignite.Core.IgniteConfiguration.SystemThreadPoolSize
getset
TransactionConfiguration Apache.Ignite.Core.IgniteConfiguration.TransactionConfiguration
getset
IDictionary<string, object> Apache.Ignite.Core.IgniteConfiguration.UserAttributes
getset

These attributes can be retrieved later via IClusterNode.GetAttributes. Environment variables are added to node attributes automatically. NOTE: attribute names starting with "org.apache.ignite" are reserved for internal use.

int Apache.Ignite.Core.IgniteConfiguration.UtilityCacheThreadPoolSize
getset
string Apache.Ignite.Core.IgniteConfiguration.WorkDirectory
getset