Package com.hazelcast.jet.core.function
Interface KeyedWindowResultFunction<K,R,OUT>
- Type Parameters:
K- type of the keyR- the type of aggregation result this function receivesOUT- the type of the output item this function returns
- All Superinterfaces:
Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents the function you pass to windowing processors
such as
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.- Since:
- Jet 3.0
-
Method Summary
-
Method Details
-
apply
@Nullable OUT apply(long winStart, long winEnd, @Nonnull K key, @Nonnull R windowResult, boolean isEarly) Applies the function to the given arguments- Parameters:
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 byWindowDefinition.setEarlyResultsPeriod(long)- Returns:
- the function result
-