Package org.apache.lucene.store
Enum Class ReadAdvice
- All Implemented Interfaces:
Serializable
,Comparable<ReadAdvice>
,Constable
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 ConstantsEnum ConstantDescriptionNormal behavior.Data is expected to be read in a random-access fashion, either byseeking
often and reading relatively short sequences of bytes at once, or by reading data through theRandomAccessInput
abstraction in random order.Data is treated as random-access memory in practice.Data is expected to be read sequentially with very little seeking at most. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadAdvice
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.
-
Enum Constant Details
-
NORMAL
Normal behavior. Data is expected to be read mostly sequentially. The system is expected to cache the hottest pages. -
RANDOM
Data is expected to be read in a random-access fashion, either byseeking
often and reading relatively short sequences of bytes at once, or by reading data through theRandomAccessInput
abstraction in random order. -
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
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
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
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 nameNullPointerException
- if the argument is null
-