org.apache.lucene.index

## Interface MergeScheduler.MergeSource

Enclosing class:
  MergeScheduler

    public static interface MergeScheduler.MergeSource

Provides access to new merges and executes the actual merge

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

### Method Summary

All Methods Instance Methods Abstract Methods
`MergePolicy.OneMerge` `getNextMerge()` The `MergeScheduler` calls this method to retrieve the next merge requested by the MergePolicy
`boolean` `hasPendingMerges()` Expert: returns true if there are merges waiting to be scheduled.
`void` `merge(MergePolicy.OneMerge merge)` Merges the indicated segments, replacing them in the stack with a single segment.
`void` `onMergeFinished(MergePolicy.OneMerge merge)` Does finishing for a merge.

### Method Detail

#### getNextMerge

    MergePolicy.OneMerge getNextMerge()

The `MergeScheduler` calls this method to retrieve the next merge requested by the MergePolicy

#### onMergeFinished

    void onMergeFinished(MergePolicy.OneMerge merge)

Does finishing for a merge.

#### hasPendingMerges

    boolean hasPendingMerges()

Expert: returns true if there are merges waiting to be scheduled.

#### merge

    void merge(MergePolicy.OneMerge merge)
        throws IOException

Merges the indicated segments, replacing them in the stack with a single segment.

Throws:
  `IOException`