Search in sources :

Example 1 with NoOpPageEvictionTracker

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

the class FreeListImplSelfTest method createFreeList.

/**
     * @param pageSize Page size.
     * @return Free list.
     * @throws Exception If failed.
     */
protected FreeList createFreeList(int pageSize) throws Exception {
    MemoryPolicyConfiguration plcCfg = new MemoryPolicyConfiguration().setMaxSize(1024 * MB);
    pageMem = createPageMemory(pageSize, plcCfg);
    long metaPageId = pageMem.allocatePage(1, 1, PageIdAllocator.FLAG_DATA);
    MemoryMetricsImpl metrics = new MemoryMetricsImpl(plcCfg);
    MemoryPolicy memPlc = new MemoryPolicy(pageMem, plcCfg, metrics, new NoOpPageEvictionTracker());
    return new FreeListImpl(1, "freelist", metrics, memPlc, null, null, metaPageId, true);
}
Also used : NoOpPageEvictionTracker(org.apache.ignite.internal.processors.cache.database.evict.NoOpPageEvictionTracker) FreeListImpl(org.apache.ignite.internal.processors.cache.database.freelist.FreeListImpl) MemoryPolicy(org.apache.ignite.internal.processors.cache.database.MemoryPolicy) MemoryPolicyConfiguration(org.apache.ignite.configuration.MemoryPolicyConfiguration) MemoryMetricsImpl(org.apache.ignite.internal.processors.cache.database.MemoryMetricsImpl)

Aggregations

MemoryPolicyConfiguration (org.apache.ignite.configuration.MemoryPolicyConfiguration)1 MemoryMetricsImpl (org.apache.ignite.internal.processors.cache.database.MemoryMetricsImpl)1 MemoryPolicy (org.apache.ignite.internal.processors.cache.database.MemoryPolicy)1 NoOpPageEvictionTracker (org.apache.ignite.internal.processors.cache.database.evict.NoOpPageEvictionTracker)1 FreeListImpl (org.apache.ignite.internal.processors.cache.database.freelist.FreeListImpl)1