public interface WatermarkPolicyFactory
extends java.io.Serializable
WatermarkPolicy
. Used by the ShardRecordsIterator
to create a watermark policy for every shard.Modifier and Type | Interface and Description |
---|---|
static class |
WatermarkPolicyFactory.ArrivalTimeWatermarkPolicy
ArrivalTimeWatermarkPolicy uses
WatermarkPolicyFactory.CustomWatermarkPolicy for watermark computation. |
static class |
WatermarkPolicyFactory.CustomWatermarkPolicy
CustomWatermarkPolicy uses parameters defined in
WatermarkParameters to compute
watermarks. |
static class |
WatermarkPolicyFactory.ProcessingTimeWatermarkPolicy
Watermark policy where the processing time is used as the event time.
|
Modifier and Type | Method and Description |
---|---|
WatermarkPolicy |
createWatermarkPolicy() |
static WatermarkPolicyFactory |
withArrivalTimePolicy()
Returns an ArrivalTimeWatermarkPolicy.
|
static WatermarkPolicyFactory |
withArrivalTimePolicy(Duration watermarkIdleDurationThreshold)
Returns an ArrivalTimeWatermarkPolicy.
|
static WatermarkPolicyFactory |
withCustomWatermarkPolicy(WatermarkParameters watermarkParameters)
Returns an custom WatermarkPolicyFactory.
|
static WatermarkPolicyFactory |
withProcessingTimePolicy()
Returns an ProcessingTimeWatermarkPolicy.
|
WatermarkPolicy createWatermarkPolicy()
static WatermarkPolicyFactory withArrivalTimePolicy()
static WatermarkPolicyFactory withArrivalTimePolicy(Duration watermarkIdleDurationThreshold)
watermarkIdleDurationThreshold
- watermark idle duration threshold.static WatermarkPolicyFactory withProcessingTimePolicy()
static WatermarkPolicyFactory withCustomWatermarkPolicy(WatermarkParameters watermarkParameters)
watermarkParameters
- Watermark parameters (timestamp extractor, watermark lag) for the
policy.