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.
  • 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.
    • RANDOM_PRELOAD

      public static final ReadAdvice RANDOM_PRELOAD
      Data is treated as random-access memory in practice. Directory implementations may explicitly load the content of the file in memory, or provide hints to the system so that it loads the content of the file into the page cache at open time. This should only be used on very small files that can be expected to fit in RAM with very high confidence.
  • 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