Module org.apache.lucene.monitor
Package org.apache.lucene.monitor
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutorService
The field for theexecutor
record component.private final MatcherFactory
<T> The field for thematcherFactory
record component.private final int
The field for thethreads
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ParallelMatcherFactory
(ExecutorService executor, MatcherFactory<T> matcherFactory, int threads) Creates an instance of aParallelMatcherFactory
record class. -
Method Summary
Modifier and TypeMethodDescriptioncreateMatcher
(IndexSearcher searcher) Create a newCandidateMatcher
object, to select queries to match against the passed-in IndexSearcherfinal boolean
Indicates whether some other object is "equal to" this one.executor()
Returns the value of theexecutor
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thematcherFactory
record component.int
threads()
Returns the value of thethreads
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
executor
The field for theexecutor
record component. -
matcherFactory
The field for thematcherFactory
record component. -
threads
private final int threadsThe field for thethreads
record component.
-
-
Constructor Details
-
ParallelMatcherFactory
private ParallelMatcherFactory(ExecutorService executor, MatcherFactory<T> matcherFactory, int threads) Creates an instance of aParallelMatcherFactory
record class.- Parameters:
executor
- the value for theexecutor
record componentmatcherFactory
- the value for thematcherFactory
record componentthreads
- the value for thethreads
record component
-
-
Method Details
-
createMatcher
Description copied from interface:MatcherFactory
Create a newCandidateMatcher
object, to select queries to match against the passed-in IndexSearcher- Specified by:
createMatcher
in interfaceMatcherFactory<T extends QueryMatch>
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
executor
Returns the value of theexecutor
record component.- Returns:
- the value of the
executor
record component
-
matcherFactory
Returns the value of thematcherFactory
record component.- Returns:
- the value of the
matcherFactory
record component
-
threads
public int threads()Returns the value of thethreads
record component.- Returns:
- the value of the
threads
record component
-