Package cz.o2.proxima.direct.core.time
Class ProcessingTimeShiftingWatermarkIdlePolicy
- java.lang.Object
-
- cz.o2.proxima.direct.core.time.ProcessingTimeShiftingWatermarkIdlePolicy
-
- All Implemented Interfaces:
WatermarkIdlePolicy
,java.io.Serializable
public class ProcessingTimeShiftingWatermarkIdlePolicy extends java.lang.Object implements WatermarkIdlePolicy
Idle policy that shifts watermark by the amount of processing time elapsed in the idle state.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProcessingTimeShiftingWatermarkIdlePolicy.Factory
-
Constructor Summary
Constructors Modifier Constructor Description ProcessingTimeShiftingWatermarkIdlePolicy()
protected
ProcessingTimeShiftingWatermarkIdlePolicy(Factory<java.lang.Long> timeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getIdleWatermark()
Returns watermark for idle source.void
idle(long currentWatermark)
Signals that a source is idle.void
update(StreamElement element)
Updates policy state when a new element is received from streaming source.
-
-
-
Constructor Detail
-
ProcessingTimeShiftingWatermarkIdlePolicy
public ProcessingTimeShiftingWatermarkIdlePolicy()
-
ProcessingTimeShiftingWatermarkIdlePolicy
protected ProcessingTimeShiftingWatermarkIdlePolicy(Factory<java.lang.Long> timeFactory)
-
-
Method Detail
-
getIdleWatermark
public long getIdleWatermark()
Description copied from interface:WatermarkIdlePolicy
Returns watermark for idle source.- Specified by:
getIdleWatermark
in interfaceWatermarkIdlePolicy
- Returns:
- the watermark.
-
update
public void update(StreamElement element)
Description copied from interface:WatermarkIdlePolicy
Updates policy state when a new element is received from streaming source.- Specified by:
update
in interfaceWatermarkIdlePolicy
- Parameters:
element
- a stream element.
-
idle
public void idle(long currentWatermark)
Description copied from interface:WatermarkIdlePolicy
Signals that a source is idle.- Specified by:
idle
in interfaceWatermarkIdlePolicy
- Parameters:
currentWatermark
- the most recent watermark estimated by watermark estimatorWatermarkEstimator
.
-
-