Package org.aksw.commons.io.block.impl
Class PageManagerWrapper
java.lang.Object
org.aksw.commons.io.block.impl.PageManagerWrapper
- All Implemented Interfaces:
BlockSource,PageManager
A wrapper that virtually puts a displaced page view over a delegate
There must be a 1:1 correspondence between page and byte buffer.
Hence, if a virtual page stretches over multiple physical ones, the data is copied
into a buffer of sufficient size.
view: displacement [ ] [ ] [ ] [ ] [ ] [ ]
delegate: [ p1 ] [ p2 ] [ p3 ] [ p4 ]
- Author:
- raven
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe maximum position in the underlying bufferintThe pageSize.requestBufferForPage(long page) 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
-
delegate
-
displacement
protected long displacement -
virtPageSize
protected int virtPageSize
-
-
Constructor Details
-
PageManagerWrapper
-
-
Method Details
-
requestBufferForPage
- Specified by:
requestBufferForPagein interfacePageManager
-
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:
-