Package org.apache.lucene.index
Class TermsHashPerField.PostingsBytesStartArray
- java.lang.Object
-
- org.apache.lucene.util.BytesRefHash.BytesStartArray
-
- org.apache.lucene.index.TermsHashPerField.PostingsBytesStartArray
-
- Enclosing class:
- TermsHashPerField
private static final class TermsHashPerField.PostingsBytesStartArray extends BytesRefHash.BytesStartArray
-
-
Field Summary
Fields Modifier and Type Field Description private Counter
bytesUsed
private TermsHashPerField
perField
-
Constructor Summary
Constructors Modifier Constructor Description private
PostingsBytesStartArray(TermsHashPerField perField, Counter bytesUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Counter
bytesUsed()
ACounter
reference holding the number of bytes used by thisBytesRefHash.BytesStartArray
.int[]
clear()
clears theBytesRefHash.BytesStartArray
and returns the cleared instance.int[]
grow()
Grows theBytesRefHash.BytesStartArray
int[]
init()
Initializes the BytesStartArray.
-
-
-
Field Detail
-
perField
private final TermsHashPerField perField
-
bytesUsed
private final Counter bytesUsed
-
-
Constructor Detail
-
PostingsBytesStartArray
private PostingsBytesStartArray(TermsHashPerField perField, Counter bytesUsed)
-
-
Method Detail
-
init
public int[] init()
Description copied from class:BytesRefHash.BytesStartArray
Initializes the BytesStartArray. This call will allocate memory- Specified by:
init
in classBytesRefHash.BytesStartArray
- Returns:
- the initialized bytes start array
-
grow
public int[] grow()
Description copied from class:BytesRefHash.BytesStartArray
Grows theBytesRefHash.BytesStartArray
- Specified by:
grow
in classBytesRefHash.BytesStartArray
- Returns:
- the grown array
-
clear
public int[] clear()
Description copied from class:BytesRefHash.BytesStartArray
clears theBytesRefHash.BytesStartArray
and returns the cleared instance.- Specified by:
clear
in classBytesRefHash.BytesStartArray
- Returns:
- the cleared instance, this might be
null
-
bytesUsed
public Counter bytesUsed()
Description copied from class:BytesRefHash.BytesStartArray
ACounter
reference holding the number of bytes used by thisBytesRefHash.BytesStartArray
. TheBytesRefHash
uses this reference to track it memory usage- Specified by:
bytesUsed
in classBytesRefHash.BytesStartArray
- Returns:
- a
AtomicLong
reference holding the number of bytes used by thisBytesRefHash.BytesStartArray
.
-
-