Interface QueriedPointProcessor<P extends TemporalPoint<?,T>, K extends QueryKey<T>, T extends TemporalPointType & QueryablePointType<T>>
- Type Parameters:
P- the temporal point type processedK- the query key typeT- 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 TypeMethodDescriptionvoidCalled exactly once after all points have been processed or processing has stopped.voidonError(QualityCode error) Called on a terminal error given as a quality code; processing stops.voidCalled on a terminal error given as an exception; processing stops.booleanonInitialize(ProcessingContext<K, T> context) Called once before any points are processed.voidonKeyFailure(K queryKey, QualityCode failureCode) Called when one query key fails; processing continues for the other keys.booleanonPointAvailable(K queryKey, P point) Called for each point in the result.default voidonWatermark(Instant time) Called when the engine has emitted every point with a timestamp at or beforetime.default voidonWatermark(K queryKey, Instant time) Called when the engine has emitted every point forqueryKeybeforetime.
-
Method Details
-
onInitialize
Called once before any points are processed.- Parameters:
context- the processing context- Returns:
trueto continue processing,falseto stop- Throws:
IllegalStateException- if the context is invalid or missing required properties
-
onPointAvailable
Called for each point in the result.- Parameters:
queryKey- the key the point belongs topoint- the point to process- Returns:
trueto continue processing,falseto stop- Throws:
IllegalStateException- if called before successful initialization
-
onKeyFailure
Called when one query key fails; processing continues for the other keys. May be called beforeonInitialize(ProcessingContext).- Parameters:
queryKey- the failed keyfailureCode- the quality code giving the reason
-
onError
Called on a terminal error given as a quality code; processing stops.- Parameters:
error- the error
-
onError
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
Called when the engine has emitted every point with a timestamp at or beforetime. The default does nothing. -
onWatermark
Called when the engine has emitted every point forqueryKeybeforetime. UnlikeonWatermark(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.
-