|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.index.NumericDocValues
org.apache.lucene.util.LongValues
org.apache.lucene.util.packed.PagedGrowableWriter
public final class PagedGrowableWriter
A 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 AbstractAppendingLongBuffer related ones only when
you need random write-access. Otherwise this class will likely be slower and
less memory-efficient.
| Field Summary |
|---|
| Fields inherited from class org.apache.lucene.index.NumericDocValues |
|---|
EMPTY |
| Constructor Summary | |
|---|---|
PagedGrowableWriter(long size,
int pageSize,
int startBitsPerValue,
float acceptableOverheadRatio)
Create a new PagedGrowableWriter instance. |
|
| Method Summary | |
|---|---|
protected long |
baseRamBytesUsed()
|
protected void |
fillPages()
|
long |
get(long index)
Get value at index. |
T |
grow()
Similar to ArrayUtil.grow(long[]). |
T |
grow(long minSize)
Similar to ArrayUtil.grow(long[], int). |
protected PackedInts.Mutable |
newMutable(int valueCount,
int bitsPerValue)
|
protected PagedGrowableWriter |
newUnfilledCopy(long newSize)
|
long |
ramBytesUsed()
Return the number of bytes used by this object. |
T |
resize(long newSize)
Create a new copy of size newSize based on the content of
this buffer. |
void |
set(long index,
long value)
Set value at index. |
long |
size()
The number of values. |
String |
toString()
|
| Methods inherited from class org.apache.lucene.util.LongValues |
|---|
get |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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 ratio| Method Detail |
|---|
protected PackedInts.Mutable newMutable(int valueCount,
int bitsPerValue)
protected PagedGrowableWriter newUnfilledCopy(long newSize)
protected long baseRamBytesUsed()
protected final void fillPages()
public final long size()
public final long get(long index)
LongValuesindex.
get in class LongValues
public final void set(long index,
long value)
index.
public long ramBytesUsed()
public final T resize(long newSize)
newSize based on the content of
this buffer. This method is much more efficient than creating a new
instance and copying values one by one.
public final T grow(long minSize)
ArrayUtil.grow(long[], int).
public final T grow()
ArrayUtil.grow(long[]).
public final String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||