Search in sources :

Example 1 with NoOpPageEvictionTracker

use of org.apache.ignite.internal.processors.cache.persistence.evict.NoOpPageEvictionTracker in project ignite by apache.

the class CacheFreeListImplSelfTest method createFreeList.

/**
 * @param pageSize Page size.
 * @return Free list.
 * @throws Exception If failed.
 */
protected FreeList createFreeList(int pageSize) throws Exception {
    DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB).setMaxSize(1024 * MB);
    pageMem = createPageMemory(pageSize, plcCfg);
    long metaPageId = pageMem.allocatePage(1, 1, PageIdAllocator.FLAG_DATA);
    DataRegionMetricsImpl regionMetrics = new DataRegionMetricsImpl(plcCfg);
    DataRegion dataRegion = new DataRegion(pageMem, plcCfg, regionMetrics, new NoOpPageEvictionTracker());
    return new CacheFreeListImpl(1, "freelist", regionMetrics, dataRegion, null, null, metaPageId, true);
}
Also used : DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) NoOpPageEvictionTracker(org.apache.ignite.internal.processors.cache.persistence.evict.NoOpPageEvictionTracker) CacheFreeListImpl(org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeListImpl) DataRegionMetricsImpl(org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl) DataRegion(org.apache.ignite.internal.processors.cache.persistence.DataRegion)

Aggregations

DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)1 DataRegion (org.apache.ignite.internal.processors.cache.persistence.DataRegion)1 DataRegionMetricsImpl (org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl)1 NoOpPageEvictionTracker (org.apache.ignite.internal.processors.cache.persistence.evict.NoOpPageEvictionTracker)1 CacheFreeListImpl (org.apache.ignite.internal.processors.cache.persistence.freelist.CacheFreeListImpl)1