ResultAggregator
abstract class ResultAggregator<DataFrame, State, AnalyzerResult, InterimResult, FinalResult>(listener: AggregateResultListener<InterimResult, FinalResult>, initialState: State, statsName: String?) : StatefulResultHandler<DataFrame, State, AnalyzerResult, Boolean> , LifecycleObserver
Content copied to clipboard
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
fun <State, InterimResult, FinalResult> ResultAggregator(listener: AggregateResultListener<InterimResult, FinalResult>, initialState: State, statsName: String?)
Content copied to clipboard
Functions
Link copied to clipboard
abstract suspend fun aggregateResult(frame: DataFrame, result: AnalyzerResult): Pair<InterimResult, FinalResult?>
Content copied to clipboard
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
open suspend override fun onResult(result: AnalyzerResult, data: DataFrame): Boolean
Content copied to clipboard