org.apache.lucene.index
public class ConcurrentMergeScheduler extends MergeScheduler
MergeScheduler that runs each merge using a
separate thread, up until a maximum number of threads
(setMaxThreadCount(int)) at which points merges are
run in the foreground, serially. This is a simple way
to use concurrency in the indexing process without
having to create and manage application level
threads.| Constructor and Description |
|---|
ConcurrentMergeScheduler() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
anyUnhandledExceptions()
Used for testing
|
void |
close()
Close this MergeScheduler.
|
int |
getMaxThreadCount()
Get the max # simultaneous threads that may be
running.
|
int |
getMergeThreadPriority()
Return the priority that merge threads run at.
|
void |
merge(IndexWriter writer)
Run the merges provided by
IndexWriter.getNextMerge(). |
void |
setMaxThreadCount(int count)
Sets the max # simultaneous threads that may be
running.
|
void |
setMergeThreadPriority(int pri)
Return the priority that merge threads run at.
|
static void |
setTestMode() |
void |
sync() |
public void setMaxThreadCount(int count)
public int getMaxThreadCount()
public int getMergeThreadPriority()
public void setMergeThreadPriority(int pri)
public void close()
MergeSchedulerpublic void sync()
public void merge(IndexWriter writer) throws CorruptIndexException, IOException
MergeSchedulerIndexWriter.getNextMerge().CorruptIndexExceptionIOExceptionpublic static boolean anyUnhandledExceptions()
public static void setTestMode()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.