ReadAdvice (Lucene 10.5.1 core API)
Description: declaration: package: org.apache.lucene.store, enum: ReadAdvice

Package org.apache.lucene.store

# Enum Class ReadAdvice

java.lang.Object
java.lang.Enum<ReadAdvice>
org.apache.lucene.store.ReadAdvice

All Implemented Interfaces:
  `Serializable`, `Comparable<ReadAdvice>`, `Constable`

public enum ReadAdvice extends Enum<ReadAdvice>
Advice regarding the read access pattern.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `NORMAL`
  Normal behavior.
  `RANDOM`
  Data is expected to be read in a random-access fashion, either by `seeking` often and reading relatively short sequences of bytes at once, or by reading data through the `RandomAccessInput` abstraction in random order.
  `SEQUENTIAL`
  Data is expected to be read sequentially with very little seeking at most.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ReadAdvice`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static ReadAdvice[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

  ### Methods inherited from class java.lang.Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### NORMAL

    public static final ReadAdvice NORMAL
    Normal behavior. Data is expected to be read mostly sequentially. The system is expected to cache the hottest pages.

  - ### RANDOM

    public static final ReadAdvice RANDOM
    Data is expected to be read in a random-access fashion, either by `seeking` often and reading relatively short sequences of bytes at once, or by reading data through the `RandomAccessInput` abstraction in random order.

  - ### SEQUENTIAL

    public static final ReadAdvice SEQUENTIAL
    Data is expected to be read sequentially with very little seeking at most. The system may read ahead aggressively and free pages soon after they are accessed.

- ## Method Details

  - ### values

    public static ReadAdvice[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static ReadAdvice valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null