org.apache.lucene.index

## Class MergeScheduler

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

- All Implemented Interfaces:
    Closeable, AutoCloseable
  Direct Known Subclasses:
    ConcurrentMergeScheduler, NoMergeScheduler, SerialMergeScheduler

      public abstract class MergeScheduler
      extends Object
      implements Closeable

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

  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `MergeScheduler()` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `close()` Close this MergeScheduler.
    `abstract void` | `merge(IndexWriter writer)` Run the merges provided by `IndexWriter.getNextMerge()`.

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

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

- - ### Constructor Detail

    - #### MergeScheduler

          protected MergeScheduler()

      Sole constructor. (For invocation by subclass constructors, typically implicit.)

  - ### Method Detail

    - #### merge

          public abstract void merge(IndexWriter writer)
                              throws IOException

      Run the merges provided by `IndexWriter.getNextMerge()`.
      Throws:
        `IOException`

    - #### close

          public abstract void close()
                              throws IOException

      Close this MergeScheduler.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.