Package org.apache.lucene.util
Class BytesRefHash.DirectBytesStartArray
- java.lang.Object
 - 
- org.apache.lucene.util.BytesRefHash.BytesStartArray
 - 
- org.apache.lucene.util.BytesRefHash.DirectBytesStartArray
 
 
 
- 
- Enclosing class:
 - BytesRefHash
 
public static class BytesRefHash.DirectBytesStartArray extends BytesRefHash.BytesStartArray
A simpleBytesRefHash.BytesStartArraythat tracks memory allocation using a privateCounterinstance. 
- 
- 
Constructor Summary
Constructors Constructor Description DirectBytesStartArray(int initSize)DirectBytesStartArray(int initSize, Counter counter) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CounterbytesUsed()ACounterreference holding the number of bytes used by thisBytesRefHash.BytesStartArray.int[]clear()clears theBytesRefHash.BytesStartArrayand returns the cleared instance.int[]grow()Grows theBytesRefHash.BytesStartArrayint[]init()Initializes the BytesStartArray. 
 - 
 
- 
- 
Constructor Detail
- 
DirectBytesStartArray
public DirectBytesStartArray(int initSize, Counter counter) 
- 
DirectBytesStartArray
public DirectBytesStartArray(int initSize)
 
 - 
 
- 
Method Detail
- 
clear
public int[] clear()
Description copied from class:BytesRefHash.BytesStartArrayclears theBytesRefHash.BytesStartArrayand returns the cleared instance.- Specified by:
 clearin classBytesRefHash.BytesStartArray- Returns:
 - the cleared instance, this might be 
null 
 
- 
grow
public int[] grow()
Description copied from class:BytesRefHash.BytesStartArrayGrows theBytesRefHash.BytesStartArray- Specified by:
 growin classBytesRefHash.BytesStartArray- Returns:
 - the grown array
 
 
- 
init
public int[] init()
Description copied from class:BytesRefHash.BytesStartArrayInitializes the BytesStartArray. This call will allocate memory- Specified by:
 initin classBytesRefHash.BytesStartArray- Returns:
 - the initialized bytes start array
 
 
- 
bytesUsed
public Counter bytesUsed()
Description copied from class:BytesRefHash.BytesStartArrayACounterreference holding the number of bytes used by thisBytesRefHash.BytesStartArray. TheBytesRefHashuses this reference to track it memory usage- Specified by:
 bytesUsedin classBytesRefHash.BytesStartArray- Returns:
 - a 
AtomicLongreference holding the number of bytes used by thisBytesRefHash.BytesStartArray. 
 
 - 
 
 -