|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.util.packed.AppendingDeltaPackedLongBuffer
public final class AppendingDeltaPackedLongBuffer
Utility class to buffer a list of signed longs in memory. This class only supports appending and is optimized for the case where values are close to each other.
| Constructor Summary | |
|---|---|
AppendingDeltaPackedLongBuffer()
Create an AppendingDeltaPackedLongBuffer with initialPageCount=16,
pageSize=1024 and acceptableOverheadRatio=PackedInts.DEFAULT |
|
AppendingDeltaPackedLongBuffer(float acceptableOverheadRatio)
Create an AppendingDeltaPackedLongBuffer with initialPageCount=16,
pageSize=1024 |
|
AppendingDeltaPackedLongBuffer(int initialPageCount,
int pageSize,
float acceptableOverheadRatio)
Create AppendingDeltaPackedLongBuffer |
|
| Method Summary | |
|---|---|
void |
add(long l)
Append a value to this buffer. |
void |
freeze()
Pack all pending values in this buffer. |
long |
get(long index)
Get a value from this buffer. |
int |
get(long index,
long[] arr,
int off,
int len)
Bulk get: read at least one and at most len longs starting
from index into arr[off:off+len] and return
the actual number of values that have been read. |
org.apache.lucene.util.packed.AbstractAppendingLongBuffer.Iterator |
iterator()
Return an iterator over the values of this buffer. |
long |
ramBytesUsed()
Return the number of bytes used by this instance. |
long |
size()
Get the number of values that have been added to the buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AppendingDeltaPackedLongBuffer(int initialPageCount,
int pageSize,
float acceptableOverheadRatio)
AppendingDeltaPackedLongBuffer
initialPageCount - the initial number of pagespageSize - the size of a single pageacceptableOverheadRatio - an acceptable overhead ratio per valuepublic AppendingDeltaPackedLongBuffer()
AppendingDeltaPackedLongBuffer with initialPageCount=16,
pageSize=1024 and acceptableOverheadRatio=PackedInts.DEFAULT
public AppendingDeltaPackedLongBuffer(float acceptableOverheadRatio)
AppendingDeltaPackedLongBuffer with initialPageCount=16,
pageSize=1024
| Method Detail |
|---|
public long ramBytesUsed()
public final long size()
public final void add(long l)
public final long get(long index)
public final int get(long index,
long[] arr,
int off,
int len)
len longs starting
from index into arr[off:off+len] and return
the actual number of values that have been read.
public org.apache.lucene.util.packed.AbstractAppendingLongBuffer.Iterator iterator()
public void freeze()
add(long) will fail.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||