@FunctionalInterface public interface WatermarkEmissionPolicy extends Serializable
Modifier and Type | Method and Description |
---|---|
static WatermarkEmissionPolicy |
emitByFrame(WindowDefinition 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. |
boolean |
shouldEmit(long currentWm,
long lastEmittedWm)
Decides whether a watermark item with the supplied
currentWm
value should be emitted, given the last emitted value lastEmittedWm . |
static WatermarkEmissionPolicy |
suppressDuplicates()
Returns a policy that ensures that each emitted watermark has a higher
timestamp than the last one.
|
boolean shouldEmit(long currentWm, long lastEmittedWm)
currentWm
value should be emitted, given the last emitted value lastEmittedWm
.@Nonnull static WatermarkEmissionPolicy suppressDuplicates()
@Nonnull static WatermarkEmissionPolicy emitByMinStep(long minStep)
minStep
more than the previous
one. This is a general, scenario-agnostic throttling policy.@Nonnull static WatermarkEmissionPolicy emitByFrame(WindowDefinition wDef)
WindowDefinition
. This
emission policy should be employed to drive a downstream processor that
computes a sliding/tumbling window
(accumulateByFrame()
or
aggregateToSlidingWindow()
).Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.