org.apache.lucene.index

## Class BaseMergePolicyTestCase.MockMergeContext

- java.lang.Object
- - org.apache.lucene.index.BaseMergePolicyTestCase.MockMergeContext

- All Implemented Interfaces:
    MergePolicy.MergeContext
  Enclosing class:
    BaseMergePolicyTestCase

      public static final class BaseMergePolicyTestCase.MockMergeContext
      extends Object
      implements MergePolicy.MergeContext

  Simple mock merge context for tests

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockMergeContext(ToIntFunction<SegmentCommitInfo> numDeletesFunc)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InfoStream` | `getInfoStream()`
    `Set<SegmentCommitInfo>` | `getMergingSegments()`
    `int` | `numDeletedDocs(SegmentCommitInfo info)`
    `int` | `numDeletesToMerge(SegmentCommitInfo info)`
    `void` | `setMergingSegments(Set<SegmentCommitInfo> mergingSegments)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MockMergeContext

          public MockMergeContext(ToIntFunction<SegmentCommitInfo> numDeletesFunc)

  - ### Method Detail

    - #### numDeletesToMerge

          public int numDeletesToMerge(SegmentCommitInfo info)

      Specified by:
        `numDeletesToMerge` in interface `MergePolicy.MergeContext`

    - #### numDeletedDocs

          public int numDeletedDocs(SegmentCommitInfo info)

      Specified by:
        `numDeletedDocs` in interface `MergePolicy.MergeContext`

    - #### getInfoStream

          public InfoStream getInfoStream()

      Specified by:
        `getInfoStream` in interface `MergePolicy.MergeContext`

    - #### getMergingSegments

          public Set<SegmentCommitInfo> getMergingSegments()

      Specified by:
        `getMergingSegments` in interface `MergePolicy.MergeContext`

    - #### setMergingSegments

          public void setMergingSegments(Set<SegmentCommitInfo> mergingSegments)

Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.