use of org.apache.ignite.internal.pagememory.io.PageIoRegistry in project ignite-3 by apache.
the class PageMemoryNoLoadSelfTest method memory.
/**
* Creates new page memory instance.
*
* @return Page memory implementation.
* @throws Exception If failed.
*/
protected PageMemory memory() throws Exception {
dataRegionCfg.change(cfg -> cfg.convert(PageMemoryDataRegionChange.class).changePageSize(PAGE_SIZE).changeInitSize(MAX_MEMORY_SIZE).changeMaxSize(MAX_MEMORY_SIZE)).get(1, SECONDS);
DirectMemoryProvider provider = new UnsafeMemoryProvider(null);
PageIoRegistry ioRegistry = new PageIoRegistry();
ioRegistry.loadFromServiceLoader();
return new PageMemoryNoStoreImpl(provider, (PageMemoryDataRegionConfiguration) fixConfiguration(dataRegionCfg), ioRegistry);
}
use of org.apache.ignite.internal.pagememory.io.PageIoRegistry in project ignite-3 by apache.
the class PageMemoryImplNoLoadTest method memory.
/**
* {@inheritDoc}
*/
@Override
protected PageMemory memory() throws Exception {
dataRegionCfg.change(cfg -> cfg.convert(PageMemoryDataRegionChange.class).changePageSize(PAGE_SIZE).changeInitSize(MAX_MEMORY_SIZE).changeMaxSize(MAX_MEMORY_SIZE)).get(1, SECONDS);
PageIoRegistry ioRegistry = new PageIoRegistry();
ioRegistry.loadFromServiceLoader();
return new PageMemoryImpl(new UnsafeMemoryProvider(null), (PageMemoryDataRegionConfiguration) fixConfiguration(dataRegionCfg), ioRegistry, LongStream.range(0, 10).map(i -> 5 * MiB).toArray(), new TestPageReadWriteManager(), (page, fullPageId, pageMemoryEx) -> {
});
}
Aggregations