Apache Ignite.NET
Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration Class Reference

A page memory configuration for an Apache Ignite node. The page memory is a manageable off-heap based memory architecture that divides all continuously allocated memory regions into pages of fixed size. An individual page can store one or many cache key-value entries that allows reusing the memory in the most efficient way and avoid memory fragmentation issues. More...

Public Member Functions

 MemoryConfiguration ()
 Initializes a new instance of the MemoryConfiguration class. More...
 
 MemoryConfiguration (IBinaryRawReader reader)
 Initializes a new instance of the MemoryConfiguration class. More...
 

Public Attributes

const long DefaultSystemCacheInitialSize = 40 * 1024 * 1024
 Default size of a memory chunk reserved for system cache initially. More...
 
const long DefaultSystemCacheMaxSize = 100 * 1024 * 1024
 Default max size of a memory chunk for the system cache. More...
 
const int DefaultPageSize = 2 * 1024
 The default page size. More...
 
const string DefaultDefaultMemoryPolicyName = "default"
 The default value for DefaultMemoryPolicyName. More...
 

Properties

long SystemCacheInitialSize [get, set]
 Gets or sets the size of a memory chunk reserved for system cache needs. More...
 
long SystemCacheMaxSize [get, set]
 Gets or sets the maximum memory region size reserved for system cache. More...
 
int PageSize [get, set]
 Gets or sets the size of the memory page. More...
 
int ConcurrencyLevel [get, set]
 Gets or sets the number of concurrent segments in Ignite internal page mapping tables. More...
 
string DefaultMemoryPolicyName [get, set]
 Gets or sets the name of the default memory policy in MemoryPolicies. More...
 
ICollection< MemoryPolicyConfigurationMemoryPolicies [get, set]
 Gets or sets the memory policies. More...
 

Detailed Description

By default, the page memory allocates a single continuous memory region. All the caches that will be configured in an application will be mapped to this memory region by default, thus, all the cache data will reside in that memory region.

If initial size of the default memory region doesn't satisfy requirements or it's required to have multiple memory regions with different properties then MemoryPolicyConfiguration can be used for both scenarios. For instance, using memory policies you can define memory regions of different maximum size, eviction policies, swapping options, etc. Once you define a new memory region you can bind particular Ignite caches to it.

To learn more about memory policies refer to MemoryPolicyConfiguration documentation.

Constructor & Destructor Documentation

Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.MemoryConfiguration ( )
Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.MemoryConfiguration ( IBinaryRawReader  reader)
Parameters
readerThe reader.

Member Data Documentation

const string Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.DefaultDefaultMemoryPolicyName = "default"
const int Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.DefaultPageSize = 2 * 1024
const long Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.DefaultSystemCacheInitialSize = 40 * 1024 * 1024
const long Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.DefaultSystemCacheMaxSize = 100 * 1024 * 1024

Property Documentation

int Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.ConcurrencyLevel
getset
string Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.DefaultMemoryPolicyName
getset
ICollection<MemoryPolicyConfiguration> Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.MemoryPolicies
getset
int Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.PageSize
getset
long Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.SystemCacheInitialSize
getset
long Apache.Ignite.Core.Cache.Configuration.MemoryConfiguration.SystemCacheMaxSize
getset