Package org.apache.lucene.tests.index
Class AlcoholicMergePolicy
- java.lang.Object
-
- org.apache.lucene.index.MergePolicy
-
- org.apache.lucene.index.LogMergePolicy
-
- org.apache.lucene.tests.index.AlcoholicMergePolicy
-
public class AlcoholicMergePolicy extends LogMergePolicy
Merge policy for testing, it is like an alcoholic. It drinks (merges) at night, and randomly decides what to drink. During the daytime it sleeps.if tests pass with this, then they are likely to pass with any bizarro merge policy users might write.
It is a fine bottle of champagne (Ordered by Martijn).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeContext, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge, MergePolicy.OneMergeProgress
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.index.LogMergePolicy
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForForcedMerge, mergeFactor, minMergeSize
-
Fields inherited from class org.apache.lucene.index.MergePolicy
DEFAULT_MAX_CFS_SEGMENT_SIZE, maxCFSSegmentSize, noCFSRatio
-
-
Constructor Summary
Constructors Constructor Description AlcoholicMergePolicy(TimeZone tz, Random random)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
size(SegmentCommitInfo info, MergePolicy.MergeContext mergeContext)
-
Methods inherited from class org.apache.lucene.index.LogMergePolicy
findForcedDeletesMerges, findForcedMerges, findMerges, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, isMerged, maxFullFlushMergeSize, setCalibrateSizeByDeletes, setMaxMergeDocs, setMergeFactor, sizeBytes, sizeDocs, toString
-
Methods inherited from class org.apache.lucene.index.MergePolicy
assertDelCount, findFullFlushMerges, findMerges, getMaxCFSSegmentSizeMB, getNoCFSRatio, isMerged, keepFullyDeletedSegment, message, numDeletesToMerge, segString, setMaxCFSSegmentSizeMB, setNoCFSRatio, useCompoundFile, verbose
-
-
-
-
Method Detail
-
size
protected long size(SegmentCommitInfo info, MergePolicy.MergeContext mergeContext) throws IOException
- Overrides:
size
in classMergePolicy
- Throws:
IOException
-
-