use of org.apache.ignite.internal.mem.file.MappedFileMemoryProvider in project ignite by apache.
the class IgniteCacheDatabaseSharedManager method initMemory.
/**
* @param memCfg memory configuration with common parameters.
* @param plcCfg memory policy with PageMemory specific parameters.
* @param memMetrics {@link MemoryMetrics} object to collect memory usage metrics.
* @return Memory policy instance.
*/
private MemoryPolicy initMemory(MemoryConfiguration memCfg, MemoryPolicyConfiguration plcCfg, MemoryMetricsImpl memMetrics) {
File allocPath = buildAllocPath(plcCfg);
DirectMemoryProvider memProvider = allocPath == null ? new UnsafeMemoryProvider(log) : new MappedFileMemoryProvider(log, allocPath);
PageMemory pageMem = createPageMemory(memProvider, memCfg, plcCfg, memMetrics);
return new MemoryPolicy(pageMem, plcCfg, memMetrics, createPageEvictionTracker(plcCfg, pageMem));
}
use of org.apache.ignite.internal.mem.file.MappedFileMemoryProvider in project ignite by apache.
the class IgniteCacheDatabaseSharedManager method initMemory.
/**
* @param memCfg memory configuration with common parameters.
* @param plcCfg data region with PageMemory specific parameters.
* @param memMetrics {@link DataRegionMetrics} object to collect memory usage metrics.
* @return data region instance.
*
* @throws IgniteCheckedException If failed to initialize swap path.
*/
private DataRegion initMemory(DataStorageConfiguration memCfg, DataRegionConfiguration plcCfg, DataRegionMetricsImpl memMetrics, boolean trackable) throws IgniteCheckedException {
File allocPath = buildAllocPath(plcCfg);
DirectMemoryProvider memProvider = allocPath == null ? new UnsafeMemoryProvider(log) : new MappedFileMemoryProvider(log, allocPath);
PageMemory pageMem = createPageMemory(memProvider, memCfg, plcCfg, memMetrics, trackable);
return new DataRegion(pageMem, plcCfg, memMetrics, createPageEvictionTracker(plcCfg, pageMem));
}
Aggregations