public interface WatermarkPolicy
Watermarkgiven the event timestamps as they occur for a single input stream. Typically the watermark will be advanced with a
fixed lagbehind the top observed timestamp so far.
This object is used by source processors to determine the current watermark. The processor may choose to create several of these objects to track each source partition separately and each processor will also have their own instance. The implementation does not need to be thread-safe.
|Modifier and Type||Method and Description|
Called to get the current watermark in the absence of an observed event.
Maintains a watermark that lags behind the top observed timestamp by the given amount.
Called to report the observation of an event with the given timestamp.
long reportEvent(long timestamp)
If the returned value is greater than the event's timestamp it means that the event should be dropped.
timestamp- event's timestamp
Long.MIN_VALUEif there is insufficient information to determine any watermark (e.g., no events observed)
@Nonnull static DistributedSupplier<WatermarkPolicy> limitingLag(long lag)
lag- the desired difference between the top observed timestamp and the watermark
Copyright © 2019 Hazelcast, Inc.. All rights reserved.