Search in sources :

Example 1 with IFileMapManager

use of org.apache.hyracks.storage.common.file.IFileMapManager in project asterixdb by apache.

the class TestStorageManagerComponentHolder method getBufferCache.

public static synchronized IBufferCache getBufferCache(INCServiceContext ctx) {
    if (bufferCache == null) {
        ICacheMemoryAllocator allocator = new HeapBufferAllocator();
        IPageReplacementStrategy prs = new ClockPageReplacementStrategy(allocator, pageSize, numPages);
        IFileMapProvider fileMapProvider = getFileMapProvider();
        bufferCache = new BufferCache(ctx.getIoManager(), prs, new DelayPageCleanerPolicy(1000), (IFileMapManager) fileMapProvider, maxOpenFiles, threadFactory);
    }
    return bufferCache;
}
Also used : IFileMapProvider(org.apache.hyracks.storage.common.file.IFileMapProvider) HeapBufferAllocator(org.apache.hyracks.storage.common.buffercache.HeapBufferAllocator) DelayPageCleanerPolicy(org.apache.hyracks.storage.common.buffercache.DelayPageCleanerPolicy) ICacheMemoryAllocator(org.apache.hyracks.storage.common.buffercache.ICacheMemoryAllocator) BufferCache(org.apache.hyracks.storage.common.buffercache.BufferCache) IBufferCache(org.apache.hyracks.storage.common.buffercache.IBufferCache) IFileMapManager(org.apache.hyracks.storage.common.file.IFileMapManager) IPageReplacementStrategy(org.apache.hyracks.storage.common.buffercache.IPageReplacementStrategy) ClockPageReplacementStrategy(org.apache.hyracks.storage.common.buffercache.ClockPageReplacementStrategy)

Aggregations

BufferCache (org.apache.hyracks.storage.common.buffercache.BufferCache)1 ClockPageReplacementStrategy (org.apache.hyracks.storage.common.buffercache.ClockPageReplacementStrategy)1 DelayPageCleanerPolicy (org.apache.hyracks.storage.common.buffercache.DelayPageCleanerPolicy)1 HeapBufferAllocator (org.apache.hyracks.storage.common.buffercache.HeapBufferAllocator)1 IBufferCache (org.apache.hyracks.storage.common.buffercache.IBufferCache)1 ICacheMemoryAllocator (org.apache.hyracks.storage.common.buffercache.ICacheMemoryAllocator)1 IPageReplacementStrategy (org.apache.hyracks.storage.common.buffercache.IPageReplacementStrategy)1 IFileMapManager (org.apache.hyracks.storage.common.file.IFileMapManager)1 IFileMapProvider (org.apache.hyracks.storage.common.file.IFileMapProvider)1