Interface QueriedPointProcessor<P extends TemporalPoint<?,T>, K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>

Type Parameters:
P - the temporal point type processed
K - the query key type
T - the point type of the keys
All Known Subinterfaces:
AggregatedPointProcessor, AnnotationPointProcessor, ComplexPointProcessor<P,K>, DataPointProcessor<P,K>, MetadataPointProcessor, RawPointProcessor
All Known Implementing Classes:
DefaultAnnotationProcessor, DefaultMetadataProcessor

public interface QueriedPointProcessor<P extends TemporalPoint<?,T>, K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>
Receives the points a query returns, for one point type, along with per-key failures and watermarks. Implementations hold their own processing state.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called exactly once after all points have been processed or processing has stopped.
    void
    Called on a terminal error given as a quality code; processing stops.
    void
    Called on a terminal error given as an exception; processing stops.
    boolean
    Called once before any points are processed.
    void
    onKeyFailure(K queryKey, QualityCode failureCode)
    Called when one query key fails; processing continues for the other keys.
    boolean
    onPointAvailable(K queryKey, P point)
    Called for each point in the result.
    default void
    Called when the engine has emitted every point with a timestamp at or before time.
    default void
    onWatermark(K queryKey, Instant time)
    Called when the engine has emitted every point for queryKey before time.
  • Method Details

    • onInitialize

      boolean onInitialize(ProcessingContext<K,T> context)
      Called once before any points are processed.
      Parameters:
      context - the processing context
      Returns:
      true to continue processing, false to stop
      Throws:
      IllegalStateException - if the context is invalid or missing required properties
    • onPointAvailable

      boolean onPointAvailable(K queryKey, P point)
      Called for each point in the result.
      Parameters:
      queryKey - the key the point belongs to
      point - the point to process
      Returns:
      true to continue processing, false to stop
      Throws:
      IllegalStateException - if called before successful initialization
    • onKeyFailure

      void onKeyFailure(K queryKey, QualityCode failureCode)
      Called when one query key fails; processing continues for the other keys. May be called before onInitialize(ProcessingContext).
      Parameters:
      queryKey - the failed key
      failureCode - the quality code giving the reason
    • onError

      void onError(QualityCode error)
      Called on a terminal error given as a quality code; processing stops.
      Parameters:
      error - the error
    • onError

      void onError(Exception error)
      Called on a terminal error given as an exception; processing stops.
      Parameters:
      error - the cause
    • onComplete

      void onComplete()
      Called exactly once after all points have been processed or processing has stopped.
    • onWatermark

      default void onWatermark(Instant time)
      Called when the engine has emitted every point with a timestamp at or before time. The default does nothing.
    • onWatermark

      default void onWatermark(K queryKey, Instant time)
      Called when the engine has emitted every point for queryKey before time. Unlike onWatermark(Instant) it speaks for one key only, so an engine whose rows are time-ordered per node can emit it without vouching for nodes it has not scanned. The default does nothing.