Package org.aksw.commons.io.block.impl
Class PageManagerOverDataStreamSource
java.lang.Object
org.aksw.commons.io.block.impl.PageManagerOverDataStreamSource
- All Implemented Interfaces:
BlockSource,PageManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected intprotected ReadableChannelSource<byte[]> protected long -
Constructor Summary
ConstructorsConstructorDescriptionPageManagerOverDataStreamSource(ReadableChannelSource<byte[]> source, int pageSize, org.aksw.commons.cache.async.AsyncClaimingCacheImpl.Builder<Long, Page> cacheBuilder) -
Method Summary
Modifier and TypeMethodDescriptionlongThe maximum position in the underlying bufferintThe pageSize.loadPage(long pageId) org.aksw.commons.util.ref.Ref<? extends Page> requestBufferForPage(long pageId) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.commons.io.block.api.PageManager
contentAtOrAfter, contentAtOrBefore, getSizeOfBlock, hasBlockAfter, hasBlockBefore, size
-
Field Details
-
source
-
pageSize
protected int pageSize -
pageCache
-
sourceSize
protected long sourceSize -
lastPageId
protected long lastPageId
-
-
Constructor Details
-
PageManagerOverDataStreamSource
public PageManagerOverDataStreamSource(ReadableChannelSource<byte[]> source, int pageSize, org.aksw.commons.cache.async.AsyncClaimingCacheImpl.Builder<Long, Page> cacheBuilder)
-
-
Method Details
-
requestBufferForPage
- Specified by:
requestBufferForPagein interfacePageManager
-
loadPage
-
getPageSize
public int getPageSize()Description copied from interface:PageManagerThe pageSize. Must never change during the life time of a page manager.- Specified by:
getPageSizein interfacePageManager- Returns:
-
getEndPos
public long getEndPos()Description copied from interface:PageManagerThe maximum position in the underlying buffer- Specified by:
getEndPosin interfacePageManager- Returns:
-