T - The type encapsulated with the stream record.public class StreamRecord<T> extends StreamElement
| Constructor and Description |
|---|
StreamRecord(T value)
Creates a new
StreamRecord wrapping the given value. |
StreamRecord(T value,
long timestamp)
Creates a new
StreamRecord wrapping the given value. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
long |
getTimestamp()
Returns the timestamp associated with this stream value in milliseconds.
|
T |
getValue()
Returns the value wrapped in this stream value.
|
int |
hashCode() |
<X> StreamRecord<X> |
replace(X element)
Replace the currently stored value by the given new value.
|
<X> StreamRecord<X> |
replace(X value,
long timestamp)
Replace the currently stored value by the given new value and the currently stored
timestamp with the new timestamp.
|
String |
toString() |
asRecord, asWatermark, isRecord, isWatermarkpublic StreamRecord(T value)
StreamRecord wrapping the given value. The timestamp is set to the
result of new Instant(0).public StreamRecord(T value, long timestamp)
StreamRecord wrapping the given value. The timestamp is set to the
given timestamp.value - The value to wrap in this StreamRecordtimestamp - The timestamp in millisecondspublic T getValue()
public long getTimestamp()
public <X> StreamRecord<X> replace(X element)
element - Element to set in this stream valuepublic <X> StreamRecord<X> replace(X value, long timestamp)
value - The new value to wrap in this StreamRecordtimestamp - The new timestamp in millisecondsCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.