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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SerialMergeScheduler()` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close this MergeScheduler.
    `void` | `merge(IndexWriter writer)` Just do the merges in sequence.

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

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

- - ### Constructor Detail

    - #### SerialMergeScheduler

          public SerialMergeScheduler()

      Sole constructor.

  - ### Method Detail

    - #### merge

          public void merge(IndexWriter writer)
                     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`
      Throws:
        `IOException`

    - #### close

          public void close()

      Description copied from class: `MergeScheduler`
      Close this MergeScheduler.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in class `MergeScheduler`

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