Package org.apache.lucene.index
Class NoMergeScheduler
- java.lang.Object
-
- org.apache.lucene.index.MergeScheduler
-
- org.apache.lucene.index.NoMergeScheduler
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Cloneable
public final class NoMergeScheduler extends MergeScheduler
AMergeScheduler
which never executes any merges. It is also a singleton and can be accessed throughINSTANCE
. Use it if you want to prevent anIndexWriter
from ever executing merges, regardless of theMergePolicy
used. Note that you can achieve the same thing by usingNoMergePolicy
, however withNoMergeScheduler
you also ensure that no unnecessary code of anyMergeScheduler
implementation is ever executed. Hence it is recommended to use both if you want to disable merges from ever happening.
-
-
Field Summary
Fields Modifier and Type Field Description static MergeScheduler
INSTANCE
The single instance ofNoMergeScheduler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MergeScheduler
clone()
void
close()
Close this MergeScheduler.void
merge(IndexWriter writer)
Run the merges provided byIndexWriter.getNextMerge()
.
-
-
-
Field Detail
-
INSTANCE
public static final MergeScheduler INSTANCE
The single instance ofNoMergeScheduler
-
-
Method Detail
-
close
public void close()
Description copied from class:MergeScheduler
Close this MergeScheduler.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classMergeScheduler
-
merge
public void merge(IndexWriter writer)
Description copied from class:MergeScheduler
Run the merges provided byIndexWriter.getNextMerge()
.- Specified by:
merge
in classMergeScheduler
-
clone
public MergeScheduler clone()
- Overrides:
clone
in classMergeScheduler
-
-