Package org.apache.lucene.util.packed
Class PagedMutable
java.lang.Object
org.apache.lucene.index.NumericDocValues
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.PagedMutable
A 
PagedMutable. This class slices data into fixed-size blocks
 which have the same number of bits per value. It can be a useful replacement
 for PackedInts.Mutable to store more than 2B values.- 
Field SummaryFields inherited from class org.apache.lucene.index.NumericDocValuesEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionPagedMutable(long size, int pageSize, int bitsPerValue, float acceptableOverheadRatio) Create a newPagedMutableinstance.
- 
Method SummaryModifier and TypeMethodDescriptionprotected longprotected final voidfinal longget(long index) Get value atindex.final PagedMutablegrow()Similar toArrayUtil.grow(long[]).final PagedMutablegrow(long minSize) Similar toArrayUtil.grow(long[], int).protected PackedInts.MutablenewMutable(int valueCount, int bitsPerValue) protected PagedMutablenewUnfilledCopy(long newSize) longReturn the number of bytes used by this object.final PagedMutableresize(long newSize) Create a new copy of sizenewSizebased on the content of this buffer.final voidset(long index, long value) Set value atindex.final longsize()The number of values.final StringtoString()Methods inherited from class org.apache.lucene.util.LongValuesget
- 
Constructor Details- 
PagedMutablepublic 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 page
- bitsPerValue- the number of bits per value
- acceptableOverheadRatio- an acceptable overhead ratio
 
 
- 
- 
Method Details- 
newMutable
- 
newUnfilledCopy
- 
baseRamBytesUsedprotected long baseRamBytesUsed()
- 
fillPagesprotected final void fillPages()
- 
sizepublic final long size()The number of values.
- 
getpublic final long get(long index) Description copied from class:LongValuesGet value atindex.- Specified by:
- getin class- LongValues
 
- 
setpublic final void set(long index, long value) Set value atindex.
- 
ramBytesUsedpublic long ramBytesUsed()Return the number of bytes used by this object.
- 
resizeCreate a new copy of sizenewSizebased on the content of this buffer. This method is much more efficient than creating a new instance and copying values one by one.
- 
growSimilar toArrayUtil.grow(long[], int).
- 
growSimilar toArrayUtil.grow(long[]).
- 
toString
 
-