Package org.apache.lucene.util.packed
Class PagedMutable
- java.lang.Object
-
- org.apache.lucene.util.LongValues
-
- org.apache.lucene.util.packed.AbstractPagedMutable<PagedMutable>
-
- org.apache.lucene.util.packed.PagedMutable
-
- All Implemented Interfaces:
Accountable
public final class PagedMutable extends AbstractPagedMutable<PagedMutable>
APagedMutable. This class slices data into fixed-size blocks which have the same number of bits per value. It can be a useful replacement forPackedInts.Mutableto store more than 2B values.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.util.LongValues
IDENTITY, ZEROES
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description PagedMutable(long size, int pageSize, int bitsPerValue, float acceptableOverheadRatio)Create a newPagedMutableinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longbaseRamBytesUsed()protected PackedInts.MutablenewMutable(int valueCount, int bitsPerValue)protected PagedMutablenewUnfilledCopy(long newSize)-
Methods inherited from class org.apache.lucene.util.packed.AbstractPagedMutable
fillPages, get, grow, grow, ramBytesUsed, resize, set, size, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Constructor Detail
-
PagedMutable
public PagedMutable(long size, int pageSize, int bitsPerValue, float acceptableOverheadRatio)Create a newPagedMutableinstance.- Parameters:
size- the number of values to store.pageSize- the number of values per pagebitsPerValue- the number of bits per valueacceptableOverheadRatio- an acceptable overhead ratio
-
-
Method Detail
-
newMutable
protected PackedInts.Mutable newMutable(int valueCount, int bitsPerValue)
- Specified by:
newMutablein classAbstractPagedMutable<PagedMutable>
-
newUnfilledCopy
protected PagedMutable newUnfilledCopy(long newSize)
- Specified by:
newUnfilledCopyin classAbstractPagedMutable<PagedMutable>
-
baseRamBytesUsed
protected long baseRamBytesUsed()
- Overrides:
baseRamBytesUsedin classAbstractPagedMutable<PagedMutable>
-
-