@FunctionalInterface public interface WatermarkEmissionPolicy extends Serializable
Modifier and Type | Field and Description |
---|---|
static WatermarkEmissionPolicy |
NULL_EMIT_POLICY
The null-object.
|
Modifier and Type | Method and Description |
---|---|
static WatermarkEmissionPolicy |
emitByFrame(SlidingWindowPolicy wDef)
Returns a watermark emission policy that ensures that the value of
the emitted watermark belongs to a frame higher than the previous
watermark's frame, as per the supplied
WindowDefinition . |
static WatermarkEmissionPolicy |
emitByMinStep(long minStep)
Returns a watermark emission policy that ensures that each emitted
watermark's value is at least
minStep more than the previous
one. |
static WatermarkEmissionPolicy |
noThrottling()
Returns a policy that does no throttling: emits each watermark.
|
static WatermarkEmissionPolicy |
noWatermarks()
Returns a policy that doesn't emit watermarks.
|
long |
throttleWm(long currentWm,
long lastEmittedWm)
Decides which watermark to emit based on the supplied
currentWm
value and lastEmittedWm . |
static final WatermarkEmissionPolicy NULL_EMIT_POLICY
long throttleWm(long currentWm, long lastEmittedWm)
currentWm
value and lastEmittedWm
. We expect the currentWm >
lastEmittedWm
.@Nonnull static WatermarkEmissionPolicy noThrottling()
@Nonnull static WatermarkEmissionPolicy noWatermarks()
@Nonnull static WatermarkEmissionPolicy emitByMinStep(long minStep)
minStep
more than the previous
one. This is a general, scenario-agnostic throttling policy.@Nonnull static WatermarkEmissionPolicy emitByFrame(SlidingWindowPolicy wDef)
WindowDefinition
. This
emission policy should be employed to drive a downstream processor that
computes a sliding/tumbling window
(Processors.accumulateByFrameP(java.util.List<com.hazelcast.jet.function.DistributedFunction<?, ? extends K>>, java.util.List<com.hazelcast.jet.function.DistributedToLongFunction<?>>, com.hazelcast.jet.core.TimestampKind, com.hazelcast.jet.core.SlidingWindowPolicy, com.hazelcast.jet.aggregate.AggregateOperation<A, ?>)
or
Processors.aggregateToSlidingWindowP(java.util.List<com.hazelcast.jet.function.DistributedFunction<?, ? extends K>>, java.util.List<com.hazelcast.jet.function.DistributedToLongFunction<?>>, com.hazelcast.jet.core.TimestampKind, com.hazelcast.jet.core.SlidingWindowPolicy, com.hazelcast.jet.aggregate.AggregateOperation<A, R>, com.hazelcast.jet.function.KeyedWindowResultFunction<? super K, ? super R, OUT>)
).Copyright © 2018 Hazelcast, Inc.. All rights reserved.