Class MergePolicy.MergeSpecification

  • Enclosing class:
    MergePolicy

    public static class MergePolicy.MergeSpecification
    extends java.lang.Object
    A MergeSpecification instance provides the information necessary to perform multiple merges. It simply contains a list of MergePolicy.OneMerge instances.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.List<MergePolicy.OneMerge> merges
      The subset of segments to be included in the primitive merge.
    • Constructor Summary

      Constructors 
      Constructor Description
      MergeSpecification()
      Sole constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(MergePolicy.OneMerge merge)
      Adds the provided MergePolicy.OneMerge to this specification.
      (package private) boolean await()
      Waits, until interrupted, for all merges to complete.
      (package private) boolean await​(long timeout, java.util.concurrent.TimeUnit unit)
      Waits if necessary for at most the given time for all merges.
      (package private) java.util.concurrent.CompletableFuture<java.lang.Void> getMergeCompletedFutures()  
      java.lang.String segString​(Directory dir)
      Returns a description of the merges in this specification.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • merges

        public final java.util.List<MergePolicy.OneMerge> merges
        The subset of segments to be included in the primitive merge.
    • Method Detail

      • segString

        public java.lang.String segString​(Directory dir)
        Returns a description of the merges in this specification.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getMergeCompletedFutures

        java.util.concurrent.CompletableFuture<java.lang.Void> getMergeCompletedFutures()
      • await

        boolean await()
        Waits, until interrupted, for all merges to complete.
      • await

        boolean await​(long timeout,
                      java.util.concurrent.TimeUnit unit)
        Waits if necessary for at most the given time for all merges.