@FunctionalInterface public interface WatermarkEmissionPolicy extends Serializable
| 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.
|
long |
throttleWm(long currentWm,
long lastEmittedWm)
Decides which watermark to emit based on the supplied
currentWm
value and lastEmittedWm. |
long throttleWm(long currentWm,
long lastEmittedWm)
currentWm
value and lastEmittedWm. We expect the currentWm >
lastEmittedWm.@Nonnull static WatermarkEmissionPolicy noThrottling()
@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
(accumulateByFrame() or
aggregateToSlidingWindow()).Copyright © 2018 Hazelcast, Inc.. All rights reserved.