public static class PackedLongValues.Builder extends java.lang.Object implements Accountable
PackedLongValues instance.| Modifier and Type | Field and Description |
|---|---|
(package private) float |
acceptableOverheadRatio |
private static long |
BASE_RAM_BYTES_USED |
private static int |
INITIAL_PAGE_COUNT |
(package private) int |
pageMask |
(package private) int |
pageShift |
(package private) long[] |
pending |
(package private) int |
pendingOff |
(package private) long |
ramBytesUsed |
(package private) long |
size |
(package private) PackedInts.Reader[] |
values |
(package private) int |
valuesOff |
| Constructor and Description |
|---|
Builder(int pageSize,
float acceptableOverheadRatio) |
| Modifier and Type | Method and Description |
|---|---|
PackedLongValues.Builder |
add(long l)
Add a new element to this builder.
|
(package private) long |
baseRamBytesUsed() |
PackedLongValues |
build()
Build a
PackedLongValues instance that contains values that
have been added to this builder. |
(package private) void |
finish() |
(package private) void |
grow(int newBlockCount) |
private void |
pack() |
(package private) void |
pack(long[] values,
int numValues,
int block,
float acceptableOverheadRatio) |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
long |
size()
Return the number of elements that have been added to this builder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildResourcesprivate static final int INITIAL_PAGE_COUNT
private static final long BASE_RAM_BYTES_USED
final int pageShift
final int pageMask
final float acceptableOverheadRatio
long[] pending
long size
PackedInts.Reader[] values
long ramBytesUsed
int valuesOff
int pendingOff
public PackedLongValues build()
PackedLongValues instance that contains values that
have been added to this builder. This operation is destructive.long baseRamBytesUsed()
public final long ramBytesUsed()
AccountableramBytesUsed in interface Accountablepublic final long size()
public PackedLongValues.Builder add(long l)
final void finish()
private void pack()
void pack(long[] values,
int numValues,
int block,
float acceptableOverheadRatio)
void grow(int newBlockCount)