org.apache.lucene.util

## Class OfflineSorter.BufferSize

- java.lang.Object
- - org.apache.lucene.util.OfflineSorter.BufferSize

- Enclosing class:
    OfflineSorter

      public static final class OfflineSorter.BufferSize
      extends Object

  A bit more descriptive unit for constructors.
  See Also:
    `automatic()`, `megabytes(long)`

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static OfflineSorter.BufferSize` | `automatic()` Approximately half of the currently available free heap, but no less than `OfflineSorter.ABSOLUTE_MIN_SORT_BUFFER_SIZE`.
    `static OfflineSorter.BufferSize` | `megabytes(long mb)` Creates a `OfflineSorter.BufferSize` in MB.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### megabytes

          public static OfflineSorter.BufferSize megabytes(long mb)

      Creates a `OfflineSorter.BufferSize` in MB. The given values must be > 0 and < 2048.

    - #### automatic

          public static OfflineSorter.BufferSize automatic()

      Approximately half of the currently available free heap, but no less than `OfflineSorter.ABSOLUTE_MIN_SORT_BUFFER_SIZE`. However if current heap allocation is insufficient or if there is a large portion of unallocated heap-space available for sorting consult with max allowed heap size.

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.