Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 simple `BytesRefHash.BytesStartArray` that tracks memory allocation using a private `AtomicLong` instance.

Field Summary
`protected int` | `initSize`

Constructor Summary
`BytesRefHash.DirectBytesStartArray(int initSize)`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### initSize

    protected final int initSize

Constructor Detail

### BytesRefHash.DirectBytesStartArray

    public BytesRefHash.DirectBytesStartArray(int initSize)

Method Detail

### clear

    public int[] clear()

  Description copied from class: `BytesRefHash.BytesStartArray`
  clears the `BytesRefHash.BytesStartArray` and returns the cleared instance.

  Specified by:
    `clear` in class `BytesRefHash.BytesStartArray`
  Returns:
    the cleared instance, this might be `null`

### grow

    public int[] grow()

  Description copied from class: `BytesRefHash.BytesStartArray`
  Grows the `BytesRefHash.BytesStartArray`

  Specified by:
    `grow` in class `BytesRefHash.BytesStartArray`
  Returns:
    the grown array

### init

    public int[] init()

  Description copied from class: `BytesRefHash.BytesStartArray`
  Initializes the BytesStartArray. This call will allocate memory

  Specified by:
    `init` in class `BytesRefHash.BytesStartArray`
  Returns:
    the initialized bytes start array

### bytesUsed

    public AtomicLong bytesUsed()

  Description copied from class: `BytesRefHash.BytesStartArray`
  A `AtomicLong` reference holding the number of bytes used by this `BytesRefHash.BytesStartArray`. The `BytesRefHash` uses this reference to track it memory usage

  Specified by:
    `bytesUsed` in class `BytesRefHash.BytesStartArray`
  Returns:
    a `AtomicLong` reference holding the number of bytes used by this `BytesRefHash.BytesStartArray`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD