Class IngestionTimeAssigner<T>
- java.lang.Object
-
- org.apache.flink.api.common.eventtime.IngestionTimeAssigner<T>
-
- Type Parameters:
T- The type of the elements that get timestamps assigned.
- All Implemented Interfaces:
TimestampAssigner<T>
@Public public final class IngestionTimeAssigner<T> extends Object implements TimestampAssigner<T>
A timestamp assigner that assigns timestamps based on the machine's wall clock. If this assigner is used after a stream source, it realizes "ingestion time" semantics.
-
-
Field Summary
-
Fields inherited from interface org.apache.flink.api.common.eventtime.TimestampAssigner
NO_TIMESTAMP
-
-
Constructor Summary
Constructors Constructor Description IngestionTimeAssigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longextractTimestamp(T element, long recordTimestamp)Assigns a timestamp to an element, in milliseconds since the Epoch.
-
-
-
Method Detail
-
extractTimestamp
public long extractTimestamp(T element, long recordTimestamp)
Description copied from interface:TimestampAssignerAssigns a timestamp to an element, in milliseconds since the Epoch. This is independent of any particular time zone or calendar.The method is passed the previously assigned timestamp of the element. That previous timestamp may have been assigned from a previous assigner. If the element did not carry a timestamp before, this value is
TimestampAssigner.NO_TIMESTAMP(=Long.MIN_VALUE: -9223372036854775808L).- Specified by:
extractTimestampin interfaceTimestampAssigner<T>- Parameters:
element- The element that the timestamp will be assigned to.recordTimestamp- The current internal timestamp of the element, or a negative value, if no timestamp has been assigned yet.- Returns:
- The new timestamp.
-
-