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

Make IndexReaderWarmer a functional interface

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.1
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: