[jira] [Created] (LUCENE-7983) Make IndexReaderWarmer a functional interface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Created] (LUCENE-7983) Make IndexReaderWarmer a functional interface

Prajeeth Emanuel (Jira)
Dawid Weiss created LUCENE-7983:

             Summary: Make IndexReaderWarmer a functional interface
                 Key: LUCENE-7983
                 URL: https://issues.apache.org/jira/browse/LUCENE-7983
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Dawid Weiss
            Assignee: Dawid Weiss
            Priority: Trivial
             Fix For: 7.1

{{IndexReaderWarmer}} has a single method but is an abstract class with a confusing protected constructor. Can we make it a proper functional interface instead? This is marked as {{lucene.experimental}} API and while it would be a binary incompatibility, everything remains the same at the source level, even for existing implementations.

public static abstract class IndexReaderWarmer {
    /** Sole constructor. (For invocation by subclass
     *  constructors, typically implicit.) */
    protected IndexReaderWarmer() {

    /** Invoked on the {@link LeafReader} for the newly
     *  merged segment, before that segment is made visible
     *  to near-real-time readers. */
    public abstract void warm(LeafReader reader) throws IOException;

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]