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.MergeScheduler.MergeSource
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(MergeScheduler.MergeSource mergeSource,
MergeTrigger trigger)
Run the merges provided by
MergeScheduler.MergeSource.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(MergeScheduler.MergeSource mergeSource, MergeTrigger trigger)
MergeScheduler
MergeScheduler.MergeSource.getNextMerge()
.merge
in class MergeScheduler
mergeSource
- the IndexWriter
to obtain the merges from.trigger
- the MergeTrigger
that caused this merge to happenpublic 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-2021 Apache Software Foundation. All Rights Reserved.