public final class PagedGrowableWriter extends AbstractPagedMutable<PagedGrowableWriter>
PagedGrowableWriter. This class slices data into fixed-size blocks
which have independent numbers of bits per value and grow on-demand.
You should use this class instead of the PackedLongValues related ones only when
you need random write-access. Otherwise this class will likely be slower and
less memory-efficient.
| Modifier and Type | Field and Description |
|---|---|
(package private) float |
acceptableOverheadRatio |
bitsPerValue, MAX_BLOCK_SIZE, MIN_BLOCK_SIZE, pageMask, pageShift, size, subMutablesIDENTITY, ZEROES| Constructor and Description |
|---|
PagedGrowableWriter(long size,
int pageSize,
int startBitsPerValue,
float acceptableOverheadRatio)
Create a new
PagedGrowableWriter instance. |
PagedGrowableWriter(long size,
int pageSize,
int startBitsPerValue,
float acceptableOverheadRatio,
boolean fillPages) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
baseRamBytesUsed() |
protected PackedInts.Mutable |
newMutable(int valueCount,
int bitsPerValue) |
protected PagedGrowableWriter |
newUnfilledCopy(long newSize) |
fillPages, get, grow, grow, indexInPage, lastPageSize, pageIndex, pageSize, ramBytesUsed, resize, set, size, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChildResourcespublic PagedGrowableWriter(long size,
int pageSize,
int startBitsPerValue,
float acceptableOverheadRatio)
PagedGrowableWriter instance.size - the number of values to store.pageSize - the number of values per pagestartBitsPerValue - the initial number of bits per valueacceptableOverheadRatio - an acceptable overhead ratioPagedGrowableWriter(long size,
int pageSize,
int startBitsPerValue,
float acceptableOverheadRatio,
boolean fillPages)
protected PackedInts.Mutable newMutable(int valueCount, int bitsPerValue)
newMutable in class AbstractPagedMutable<PagedGrowableWriter>protected PagedGrowableWriter newUnfilledCopy(long newSize)
newUnfilledCopy in class AbstractPagedMutable<PagedGrowableWriter>protected long baseRamBytesUsed()
baseRamBytesUsed in class AbstractPagedMutable<PagedGrowableWriter>