public class WaterMarkEventGenerator<T> extends Object implements Runnable
| Constructor and Description |
|---|
WaterMarkEventGenerator(WindowManager<T> windowManager,
long intervalMs,
long eventTsLagMs,
Set<String> inputTopics,
Context context)
Creates a new WatermarkEventGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
shutdown() |
void |
start() |
boolean |
track(String inputTopic,
long ts)
Tracks the timestamp of the event from a topic, returns
true if the event can be considered for processing or
false if its a late event.
|
public WaterMarkEventGenerator(WindowManager<T> windowManager, long intervalMs, long eventTsLagMs, Set<String> inputTopics, Context context)
windowManager - The window manager this generator will submit watermark events tointervalMs - The generator will check if it should generate a watermark event with this intervalMseventTsLagMs - The max allowed lag behind the last watermark event before an event is considered lateinputTopics - The input topics this generator is expected to handlepublic boolean track(String inputTopic, long ts)
public void start()
public void shutdown()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.