Record Class ParallelMatcher.ParallelMatcherFactory<T extends QueryMatch>

java.lang.Object
java.lang.Record
org.apache.lucene.monitor.ParallelMatcher.ParallelMatcherFactory<T>
All Implemented Interfaces:
MatcherFactory<T>
Enclosing class:
ParallelMatcher<T extends QueryMatch>

private static record ParallelMatcher.ParallelMatcherFactory<T extends QueryMatch>(ExecutorService executor, MatcherFactory<T extends QueryMatch> matcherFactory, int threads) extends Record implements MatcherFactory<T>
  • Field Details

    • executor

      private final ExecutorService executor
      The field for the executor record component.
    • matcherFactory

      private final MatcherFactory<T extends QueryMatch> matcherFactory
      The field for the matcherFactory record component.
    • threads

      private final int threads
      The field for the threads record component.
  • Constructor Details

    • ParallelMatcherFactory

      private ParallelMatcherFactory(ExecutorService executor, MatcherFactory<T> matcherFactory, int threads)
      Creates an instance of a ParallelMatcherFactory record class.
      Parameters:
      executor - the value for the executor record component
      matcherFactory - the value for the matcherFactory record component
      threads - the value for the threads record component
  • Method Details

    • createMatcher

      public ParallelMatcher<T> createMatcher(IndexSearcher searcher)
      Description copied from interface: MatcherFactory
      Create a new CandidateMatcher object, to select queries to match against the passed-in IndexSearcher
      Specified by:
      createMatcher in interface MatcherFactory<T extends QueryMatch>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • executor

      public ExecutorService executor()
      Returns the value of the executor record component.
      Returns:
      the value of the executor record component
    • matcherFactory

      public MatcherFactory<T> matcherFactory()
      Returns the value of the matcherFactory record component.
      Returns:
      the value of the matcherFactory record component
    • threads

      public int threads()
      Returns the value of the threads record component.
      Returns:
      the value of the threads record component