Package org.apache.kafka.streams.state
Class ValueAndTimestamp<V>
java.lang.Object
org.apache.kafka.streams.state.ValueAndTimestamp<V>
- Type Parameters:
V
-
public final class ValueAndTimestamp<V> extends Object
Combines a value from a
KeyValue
with a timestamp.-
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
static <V> V
getValueOrNull(ValueAndTimestamp<V> valueAndTimestamp)
Return the wrappedvalue
of the givenvalueAndTimestamp
parameter if the parameter is notnull
.int
hashCode()
static <V> ValueAndTimestamp<V>
make(V value, long timestamp)
long
timestamp()
String
toString()
V
value()
-
Method Details
-
make
- Type Parameters:
V
- the type of the value- Parameters:
value
- the valuetimestamp
- the timestamp- Returns:
- a new
ValueAndTimestamp
instance if the providevalue
is notnull
; otherwisenull
is returned
-
getValueOrNull
Return the wrappedvalue
of the givenvalueAndTimestamp
parameter if the parameter is notnull
.- Type Parameters:
V
- the type of the value- Parameters:
valueAndTimestamp
- aValueAndTimestamp
instance; can benull
- Returns:
- the wrapped
value
ofvalueAndTimestamp
if notnull
; otherwisenull
-
value
-
timestamp
public long timestamp() -
toString
-
equals
-
hashCode
public int hashCode()
-