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:
java.io.Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface KeyedWindowResultFunction<K,R,OUT> extends java.io.Serializable
Represents the function you pass to windowing processors such asaggregateToSlidingWindowP()
andaggregateToSessionWindowP()
asmapToOutputFn
. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OUT
apply(long winStart, long winEnd, K key, R windowResult, boolean isEarly)
Applies the function to the given arguments
-
-
-
Method Detail
-
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
-
-