public final class NoMergeScheduler extends MergeScheduler
MergeScheduler
which never executes any merges. It is also a
singleton and can be accessed through INSTANCE
. Use
it if you want to prevent an IndexWriter
from ever executing merges,
regardless of the MergePolicy
used. Note that you can achieve the
same thing by using NoMergePolicy
, however with
NoMergeScheduler
you also ensure that no unnecessary code of any
MergeScheduler
implementation is ever executed. Hence it is
recommended to use both if you want to disable merges from ever happening.Modifier and Type | Field and Description |
---|---|
static MergeScheduler |
INSTANCE
The single instance of
NoMergeScheduler |
infoStream
Modifier and Type | Method and Description |
---|---|
MergeScheduler |
clone() |
void |
close()
Close this MergeScheduler.
|
void |
merge(IndexWriter writer,
MergeTrigger trigger,
boolean newMergesFound)
Run the merges provided by
IndexWriter.getNextMerge() . |
Directory |
wrapForMerge(MergePolicy.OneMerge merge,
Directory in)
Wraps the incoming
Directory so that we can merge-throttle it
using RateLimitedIndexOutput . |
message, verbose
public static final MergeScheduler INSTANCE
NoMergeScheduler
public void close()
MergeScheduler
close
in interface Closeable
close
in interface AutoCloseable
close
in class MergeScheduler
public void merge(IndexWriter writer, MergeTrigger trigger, boolean newMergesFound)
MergeScheduler
IndexWriter.getNextMerge()
.merge
in class MergeScheduler
writer
- the IndexWriter
to obtain the merges from.trigger
- the MergeTrigger
that caused this merge to happennewMergesFound
- true
iff any new merges were found by the caller otherwise false
public Directory wrapForMerge(MergePolicy.OneMerge merge, Directory in)
MergeScheduler
Directory
so that we can merge-throttle it
using RateLimitedIndexOutput
.wrapForMerge
in class MergeScheduler
public MergeScheduler clone()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.