T - The type encapsulated value@PublicEvolving public class TimestampedValue<T> extends Object
| 构造器和说明 |
|---|
TimestampedValue(T value)
Creates a new TimestampedValue.
|
TimestampedValue(T value,
long timestamp)
Creates a new TimestampedValue wrapping the given value.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> TimestampedValue<T> |
from(StreamRecord<T> streamRecord)
Creates a TimestampedValue from given
StreamRecord. |
StreamRecord<T> |
getStreamRecord()
Creates a
StreamRecord from this TimestampedValue. |
long |
getTimestamp() |
T |
getValue() |
boolean |
hasTimestamp()
Checks whether this record has a timestamp.
|
public TimestampedValue(T value)
public TimestampedValue(T value, long timestamp)
value - The value to wrap in this TimestampedValuetimestamp - The timestamp in millisecondspublic T getValue()
TimestampedValue.public long getTimestamp()
public boolean hasTimestamp()
public StreamRecord<T> getStreamRecord()
StreamRecord from this TimestampedValue.public static <T> TimestampedValue<T> from(StreamRecord<T> streamRecord)
StreamRecord.streamRecord - The StreamRecord object from which TimestampedValue is to be created.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.