T
- The type encapsulated value@PublicEvolving public class TimestampedValue<T> extends Object
Constructor and Description |
---|
TimestampedValue(T value)
Creates a new TimestampedValue.
|
TimestampedValue(T value,
long timestamp)
Creates a new TimestampedValue wrapping the given value.
|
Modifier and Type | Method and Description |
---|---|
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 TimestampedValue
timestamp
- 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–2020 The Apache Software Foundation. All rights reserved.