Class SpecializationState<T>

java.lang.Object
org.apache.druid.query.monomorphicprocessing.SpecializationState<T>
Type Parameters:
T - type of query processing algorithm

public abstract class SpecializationState<T> extends Object
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    accountLoopIterations(long loopIterations)
    Accounts the number of loop iterations, made when processing queries without specialized algorithm, i.
    abstract T
    Returns an instance of specialized version of query processing algorithm, if available, null otherwise.
    final T
    getSpecializedOrDefault(T defaultInstance)
    Returns an instance of specialized version of query processing algorithm, if available, defaultInstance otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpecializationState

      public SpecializationState()
  • Method Details

    • getSpecialized

      @Nullable public abstract T getSpecialized()
      Returns an instance of specialized version of query processing algorithm, if available, null otherwise.
    • getSpecializedOrDefault

      public final T getSpecializedOrDefault(T defaultInstance)
      Returns an instance of specialized version of query processing algorithm, if available, defaultInstance otherwise.
    • accountLoopIterations

      public abstract void accountLoopIterations(long loopIterations)
      Accounts the number of loop iterations, made when processing queries without specialized algorithm, i. e. after getSpecialized() returned null. If sufficiently many loop iterations were made, SpecializationService decides that the algorithm is worth to be specialized, and getSpecialized() will return non-null during later queries.