K - type of the keyR - the type of aggregation result this function receivesOUT - the type of the output item this function returns@FunctionalInterface public interface KeyedWindowResultFunction<K,R,OUT> extends Serializable
aggregateToSlidingWindowP()
and aggregateToSessionWindowP() as
mapToOutputFn.
It creates the item to emit based on the results of a single aggregate
operation performed for a particular window and a particular grouping
key.| Modifier and Type | Method and Description |
|---|---|
OUT |
apply(long winStart,
long winEnd,
K key,
R windowResult,
boolean isEarly)
Applies the function to the given arguments
|
@Nullable OUT apply(long winStart, long winEnd, @Nonnull K key, @Nonnull R windowResult, boolean isEarly)
winStart - the inclusive lower timestamp of the windowwinEnd - the exclusive upper timestamp of the windowkey - the grouping keywindowResult - the result of the aggregate operationisEarly - whether the result is an early result as specified by
WindowDefinition.setEarlyResultsPeriod(long)Copyright © 2023 Hazelcast, Inc.. All rights reserved.