Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7983

Make IndexReaderWarmer a functional interface

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 7.1
    • None
    • None
    • New

    Description

      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;
        }
      

      Attachments

        Activity

          People

            dweiss Dawid Weiss
            dweiss Dawid Weiss
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment