Companion

object Companion

Properties

Link copied to clipboard

Name of the generation reference file name

Link copied to clipboard
const val VERSION_74: Int = 9

The version at the time when 8.0 was released.

Link copied to clipboard
const val VERSION_86: Int = 10

The version that recorded SegmentCommitInfo IDs

Link copied to clipboard
const val VERSION_CURRENT: Int

Functions

Link copied to clipboard

Parse the generation off the segments file name and return it.

Link copied to clipboard

Returns infoStream.

Link copied to clipboard

Get the generation of the most recent commit to the list of index files (N in the segments_N file).

Get the generation of the most recent commit to the index in this directory (N in the segments_N file).

Link copied to clipboard

Get the filename of the segments_N file for the most recent commit in the list of index files.

Get the filename of the segments_N file for the most recent commit to the index in this Directory.

Link copied to clipboard
fun readCommit(directory: Directory, segmentFileName: String, minSupportedMajorVersion: Int = Version.MIN_SUPPORTED_MAJOR): SegmentInfos

Read a particular segmentFileName. Note that this may throw an IOException if a commit is in process.

fun readCommit(directory: Directory, input: ChecksumIndexInput, generation: Long, minSupportedMajorVersion: Int = Version.MIN_SUPPORTED_MAJOR): SegmentInfos

Read the commit from the provided ChecksumIndexInput.

Link copied to clipboard
fun readLatestCommit(directory: Directory, minSupportedMajorVersion: Int = Version.MIN_SUPPORTED_MAJOR): SegmentInfos

Find the latest commit (segments_N file) and load all SegmentCommitInfos.

Link copied to clipboard
fun setInfoStream(infoStream: PrintStream)

If non-null, information about retries when loading the segments file will be printed to this.