Class SpecializationState<T>

  • Type Parameters:
    T - type of query processing algorithm

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

      • SpecializationState

        public SpecializationState()
    • Method Detail

      • 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.