MergeScheduler

abstract class MergeScheduler : AutoCloseable

Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy. The default MergeScheduler is [ ].

Inheritors

Types

Link copied to clipboard
interface MergeSource

Provides access to new merges and executes the actual merge

Functions

Link copied to clipboard
open override fun close()

Close this MergeScheduler.

Link copied to clipboard

Provides an executor for parallelism during a single merge operation. By default, the method returns a SameThreadExecutorService where all intra-merge actions occur in their calling thread.

Link copied to clipboard
open fun initialize(infoStream: InfoStream, directory: Directory)

IndexWriter calls this on init.

Link copied to clipboard
abstract suspend fun merge(mergeSource: MergeScheduler.MergeSource, trigger: MergeTrigger)

Run the merges provided by MergeSource.getNextMerge.

Link copied to clipboard
fun message(message: String)

Outputs the given message - this method assumes .verbose was called and returned true.

Link copied to clipboard

Returns true if infoStream messages are enabled. This method is usually used in conjunction with .message:

Link copied to clipboard

Wraps the incoming Directory so that we can merge-throttle it using [ ].