Package org.apache.lucene.index

# Class SerialMergeScheduler

java.lang.Object
org.apache.lucene.index.MergeScheduler
org.apache.lucene.index.SerialMergeScheduler

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class SerialMergeScheduler extends MergeScheduler
A `MergeScheduler` that simply does each merge sequentially, using the current thread.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.lucene.index.MergeScheduler

  `MergeScheduler.MergeSource`

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.index.MergeScheduler

  `infoStream`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SerialMergeScheduler()`
  Sole constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  Close this MergeScheduler.
  `void`
  `merge(MergeScheduler.MergeSource mergeSource, MergeTrigger trigger)`
  Just do the merges in sequence.

  ### Methods inherited from class org.apache.lucene.index.MergeScheduler

  `getIntraMergeExecutor, message, verbose, wrapForMerge`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SerialMergeScheduler

    public SerialMergeScheduler()
    Sole constructor.

- ## Method Details

  - ### merge

    public void merge(MergeScheduler.MergeSource mergeSource, MergeTrigger trigger) throws IOException
    Just do the merges in sequence. We do this "synchronized" so that even if the application is using multiple threads, only one merge may run at a time.
    Specified by:
      `merge` in class `MergeScheduler`
    Parameters:
      `mergeSource` - the `IndexWriter` to obtain the merges from.
      `trigger` - the `MergeTrigger` that caused this merge to happen
    Throws:
      `IOException`

  - ### close

    public void close()
    Description copied from class: `MergeScheduler`
    Close this MergeScheduler.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Overrides:
      `close` in class `MergeScheduler`