public final class AppendingPackedLongBuffer extends LongValues
| Constructor and Description |
|---|
AppendingPackedLongBuffer()
Create an
AppendingPackedLongBuffer with initialPageCount=16,
pageSize=1024 and acceptableOverheadRatio=PackedInts.DEFAULT |
AppendingPackedLongBuffer(float acceptableOverheadRatio)
Create an
AppendingPackedLongBuffer with initialPageCount=16,
pageSize=1024 |
AppendingPackedLongBuffer(int initialPageCount,
int pageSize,
float acceptableOverheadRatio)
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long l)
Append a value to this buffer.
|
void |
freeze()
Pack all pending values in this buffer.
|
long |
get(long index)
Get value at
index. |
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.
|
getpublic AppendingPackedLongBuffer(int initialPageCount,
int pageSize,
float acceptableOverheadRatio)
initialPageCount - the initial number of pagespageSize - the size of a single pageacceptableOverheadRatio - an acceptable overhead ratio per valuepublic AppendingPackedLongBuffer()
AppendingPackedLongBuffer with initialPageCount=16,
pageSize=1024 and acceptableOverheadRatio=PackedInts.DEFAULTpublic AppendingPackedLongBuffer(float acceptableOverheadRatio)
AppendingPackedLongBuffer with initialPageCount=16,
pageSize=1024public final long size()
public final void add(long l)
public final long get(long index)
LongValuesindex.get in class LongValuespublic 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 long ramBytesUsed()
public void freeze()
add(long) will fail.Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.