org.apache.lucene.index

## Class ConcurrentMergeScheduler.MergeThread

- java.lang.Object
- - java.lang.Thread
  - - org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

- All Implemented Interfaces:
    Runnable
  Enclosing class:
    ConcurrentMergeScheduler

      protected class ConcurrentMergeScheduler.MergeThread
      extends Thread

  Runs a merge thread, which may run one or more merges in sequence.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `Thread.State, Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConcurrentMergeScheduler.MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge)` Sole constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MergePolicy.OneMerge` | `getCurrentMerge()` Return the current merge, or null if this `MergeThread` is done.
    `MergePolicy.OneMerge` | `getRunningMerge()` Return the currently running merge.
    `void` | `run()`
    `void` | `setRunningMerge(MergePolicy.OneMerge merge)` Record the currently running merge.
    `void` | `setThreadPriority(int pri)` Set the priority of this thread.

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

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

- - ### Constructor Detail

    - #### ConcurrentMergeScheduler.MergeThread

          public ConcurrentMergeScheduler.MergeThread(IndexWriter writer,
                                              MergePolicy.OneMerge startMerge)

      Sole constructor.

  - ### Method Detail

    - #### setRunningMerge

          public void setRunningMerge(MergePolicy.OneMerge merge)

      Record the currently running merge.

    - #### getRunningMerge

          public MergePolicy.OneMerge getRunningMerge()

      Return the currently running merge.

    - #### getCurrentMerge

          public MergePolicy.OneMerge getCurrentMerge()

      Return the current merge, or null if this `MergeThread` is done.

    - #### setThreadPriority

          public void setThreadPriority(int pri)

      Set the priority of this thread.

    - #### run

          public void run()

      Specified by:
        `run` in interface `Runnable`
      Overrides:
        `run` in class `Thread`

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