Package org.apache.lucene.util
Class BytesRefHash.BytesStartArray
java.lang.Object
org.apache.lucene.util.BytesRefHash.BytesStartArray
- Direct Known Subclasses:
BytesRefHash.DirectBytesStartArray
- Enclosing class:
- BytesRefHash
Manages allocation of the per-term addresses.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Counter
ACounter
reference holding the number of bytes used by thisBytesRefHash.BytesStartArray
.abstract int[]
clear()
clears theBytesRefHash.BytesStartArray
and returns the cleared instance.abstract int[]
grow()
Grows theBytesRefHash.BytesStartArray
abstract int[]
init()
Initializes the BytesStartArray.
-
Constructor Details
-
BytesStartArray
public BytesStartArray()
-
-
Method Details
-
init
public abstract int[] init()Initializes the BytesStartArray. This call will allocate memory- Returns:
- the initialized bytes start array
-
grow
public abstract int[] grow()Grows theBytesRefHash.BytesStartArray
- Returns:
- the grown array
-
clear
public abstract int[] clear()clears theBytesRefHash.BytesStartArray
and returns the cleared instance.- Returns:
- the cleared instance, this might be
null
-
bytesUsed
ACounter
reference holding the number of bytes used by thisBytesRefHash.BytesStartArray
. TheBytesRefHash
uses this reference to track it memory usage- Returns:
- a
AtomicLong
reference holding the number of bytes used by thisBytesRefHash.BytesStartArray
.
-