org.apache.lucene.util
Class BytesRefHash.BytesStartArray

java.lang.Object
  extended by org.apache.lucene.util.BytesRefHash.BytesStartArray
Direct Known Subclasses:
BytesRefHash.DirectBytesStartArray, BytesRefHash.TrackingDirectBytesStartArray
Enclosing class:
BytesRefHash

public abstract static class BytesRefHash.BytesStartArray
extends Object

Manages allocation of the per-term addresses.


Constructor Summary
BytesRefHash.BytesStartArray()
           
 
Method Summary
abstract  AtomicLong bytesUsed()
          A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
abstract  int[] clear()
          clears the BytesRefHash.BytesStartArray and returns the cleared instance.
abstract  int[] grow()
          Grows the BytesRefHash.BytesStartArray
abstract  int[] init()
          Initializes the BytesStartArray.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytesRefHash.BytesStartArray

public BytesRefHash.BytesStartArray()
Method Detail

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 the BytesRefHash.BytesStartArray

Returns:
the grown array

clear

public abstract int[] clear()
clears the BytesRefHash.BytesStartArray and returns the cleared instance.

Returns:
the cleared instance, this might be null

bytesUsed

public abstract AtomicLong bytesUsed()
A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray. The BytesRefHash uses this reference to track it memory usage

Returns:
a AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.