Package org.apache.kafka.streams.state
Class ValueAndTimestamp<V>
java.lang.Object
org.apache.kafka.streams.state.ValueAndTimestamp<V>
- Type Parameters:
V
-
Combines a value from a
KeyValue
with a timestamp.-
Method Summary
Modifier and TypeMethodDescriptionboolean
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) static <V> ValueAndTimestamp<V>
makeAllowNullable
(V value, long timestamp) Create a newValueAndTimestamp
instance.long
toString()
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 providedvalue
is notnull
; otherwisenull
is returned
-
makeAllowNullable
- Type Parameters:
V
- the type of the value- Parameters:
value
- the valuetimestamp
- the timestamp- Returns:
- a new
ValueAndTimestamp
instance
-
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()
-