public static class BytesRefHash.TrackingDirectBytesStartArray extends BytesRefHash.BytesStartArray
BytesRefHash.BytesStartArray that tracks all
memory allocation using a shared AtomicLong
instance.| Modifier and Type | Field and Description |
|---|---|
protected AtomicLong |
bytesUsed |
protected int |
initSize |
| Constructor and Description |
|---|
BytesRefHash.TrackingDirectBytesStartArray(int initSize,
AtomicLong bytesUsed) |
| Modifier and Type | Method and Description |
|---|---|
AtomicLong |
bytesUsed()
A
AtomicLong reference holding the number of bytes used by this
BytesRefHash.BytesStartArray. |
int[] |
clear()
clears the
BytesRefHash.BytesStartArray and returns the cleared instance. |
int[] |
grow()
Grows the
BytesRefHash.BytesStartArray |
int[] |
init()
Initializes the BytesStartArray.
|
protected final int initSize
protected final AtomicLong bytesUsed
public BytesRefHash.TrackingDirectBytesStartArray(int initSize,
AtomicLong bytesUsed)
public int[] clear()
BytesRefHash.BytesStartArrayBytesRefHash.BytesStartArray and returns the cleared instance.clear in class BytesRefHash.BytesStartArraynullpublic int[] grow()
BytesRefHash.BytesStartArrayBytesRefHash.BytesStartArraygrow in class BytesRefHash.BytesStartArraypublic int[] init()
BytesRefHash.BytesStartArrayinit in class BytesRefHash.BytesStartArraypublic AtomicLong bytesUsed()
BytesRefHash.BytesStartArrayAtomicLong reference holding the number of bytes used by this
BytesRefHash.BytesStartArray. The BytesRefHash uses this reference to
track it memory usagebytesUsed in class BytesRefHash.BytesStartArrayAtomicLong reference holding the number of bytes used
by this BytesRefHash.BytesStartArray.