Package org.apache.lucene.index
Class MergeScheduler
- java.lang.Object
-
- org.apache.lucene.index.MergeScheduler
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
- Direct Known Subclasses:
ConcurrentMergeScheduler
,NoMergeScheduler
,SerialMergeScheduler
public abstract class MergeScheduler extends Object implements Closeable, Cloneable
Expert:
IndexWriter
uses an instance implementing this interface to execute the merges selected by aMergePolicy
. The default MergeScheduler isConcurrentMergeScheduler
.Implementers of sub-classes should make sure that
clone()
returns an independent instance able to work with anyIndexWriter
instance.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MergeScheduler()
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description MergeScheduler
clone()
abstract void
close()
Close this MergeScheduler.abstract void
merge(IndexWriter writer)
Run the merges provided byIndexWriter.getNextMerge()
.
-
-
-
Method Detail
-
merge
public abstract void merge(IndexWriter writer) throws IOException
Run the merges provided byIndexWriter.getNextMerge()
.- Throws:
IOException
-
close
public abstract void close() throws IOException
Close this MergeScheduler.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
clone
public MergeScheduler clone()
-
-