@Public public final class RecordTimestampAssigner<E> extends Object implements TimestampAssigner<E>
TimestampAssignerthat forwards the already-assigned timestamp. This is for use when records come out of a source with valid timestamps, for example from the Kafka Metadata.
|Constructor and Description|
|Modifier and Type||Method and Description|
Assigns a timestamp to an element, in milliseconds since the Epoch.
public long extractTimestamp(E element, long recordTimestamp)
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
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.
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.