ResultAggregator
abstract class ResultAggregator<DataFrame, State, AnalyzerResult, InterimResult, FinalResult>(listener: AggregateResultListener<InterimResult, FinalResult>, initialState: State, statsName: String?) : StatefulResultHandler<DataFrame, State, AnalyzerResult, Boolean> , LifecycleEventObserver
The ResultAggregator processes results from analyzers until a condition is met. That condition is part of the aggregator's logic.
Constructors
Link copied to clipboard
constructor(listener: AggregateResultListener<InterimResult, FinalResult>, initialState: State, statsName: String?)
Properties
Functions
Link copied to clipboard
abstract suspend fun aggregateResult(frame: DataFrame, result: AnalyzerResult): Pair<InterimResult, FinalResult?>
Aggregate a new result. If this method returns a non-null FinalResult, the aggregator will stop listening for new results.
Link copied to clipboard
Bind this result aggregator to a lifecycle. This allows the result aggregator to pause and reset when the lifecycle owner pauses.
Link copied to clipboard
Link copied to clipboard