Class PageManagerForFileChannel

java.lang.Object
org.aksw.commons.io.block.impl.PageManagerForFileChannel
All Implemented Interfaces:
BlockSource, PageManager

public class PageManagerForFileChannel extends Object implements PageManager
  • Field Details

    • DEFAULT_PAGE_SIZE

      public static final int DEFAULT_PAGE_SIZE
      See Also:
    • pageCache

      protected com.google.common.cache.Cache<Long,org.aksw.commons.util.ref.Ref<Page>> pageCache
      The cache is crucial to the implementation. Setting its size to 0 will cause excessive allocation of pages and thus a timely OutOfMemory error.
    • channel

      protected FileChannel channel
    • channelSize

      protected long channelSize
      We rely on the channel's size being constant. A growing size should work, a shrinking one will cause exceptions.
    • pageSize

      protected int pageSize
  • Constructor Details

    • PageManagerForFileChannel

      public PageManagerForFileChannel(FileChannel channel, long channelSize, int pageSize)
  • Method Details