Search in sources :

Example 6 with MappedFileMemoryProvider

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));
}
Also used : MappedFileMemoryProvider(org.apache.ignite.internal.mem.file.MappedFileMemoryProvider) DirectMemoryProvider(org.apache.ignite.internal.mem.DirectMemoryProvider) PageMemory(org.apache.ignite.internal.pagemem.PageMemory) File(java.io.File) UnsafeMemoryProvider(org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider)

Example 7 with MappedFileMemoryProvider

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));
}
Also used : MappedFileMemoryProvider(org.apache.ignite.internal.mem.file.MappedFileMemoryProvider) DirectMemoryProvider(org.apache.ignite.internal.mem.DirectMemoryProvider) PageMemory(org.apache.ignite.internal.pagemem.PageMemory) File(java.io.File) UnsafeMemoryProvider(org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider)

Aggregations

DirectMemoryProvider (org.apache.ignite.internal.mem.DirectMemoryProvider)7 MappedFileMemoryProvider (org.apache.ignite.internal.mem.file.MappedFileMemoryProvider)7 File (java.io.File)4 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)4 DataRegionMetricsImpl (org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl)4 GridTestKernalContext (org.apache.ignite.testframework.junits.GridTestKernalContext)4 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)2 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)2 GridEncryptionManager (org.apache.ignite.internal.managers.encryption.GridEncryptionManager)2 GridSystemViewManager (org.apache.ignite.internal.managers.systemview.GridSystemViewManager)2 JmxSystemViewExporterSpi (org.apache.ignite.internal.managers.systemview.JmxSystemViewExporterSpi)2 UnsafeMemoryProvider (org.apache.ignite.internal.mem.unsafe.UnsafeMemoryProvider)2 FullPageId (org.apache.ignite.internal.pagemem.FullPageId)2 PageMemory (org.apache.ignite.internal.pagemem.PageMemory)2 PageMemoryNoStoreImpl (org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl)2 GridCacheSharedContext (org.apache.ignite.internal.processors.cache.GridCacheSharedContext)2 IgniteCacheDatabaseSharedManager (org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDatabaseSharedManager)2 CheckpointProgress (org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointProgress)2 GridMetricManager (org.apache.ignite.internal.processors.metric.GridMetricManager)2 PerformanceStatisticsProcessor (org.apache.ignite.internal.processors.performancestatistics.PerformanceStatisticsProcessor)2