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 TypeMethodDescriptionbooleanstatic <V> VgetValueOrNull(ValueAndTimestamp<V> valueAndTimestamp) Return the wrappedvalueof the givenvalueAndTimestampparameter if the parameter is notnull.inthashCode()static <V> ValueAndTimestamp<V>make(V value, long timestamp) static <V> ValueAndTimestamp<V>makeAllowNullable(V value, long timestamp) Create a newValueAndTimestampinstance.longtoString()value()
-
Method Details
-
make
- Type Parameters:
V- the type of the value- Parameters:
value- the valuetimestamp- the timestamp- Returns:
- a new
ValueAndTimestampinstance if the providedvalueis notnull; otherwisenullis returned
-
makeAllowNullable
- Type Parameters:
V- the type of the value- Parameters:
value- the valuetimestamp- the timestamp- Returns:
- a new
ValueAndTimestampinstance
-
getValueOrNull
Return the wrappedvalueof the givenvalueAndTimestampparameter if the parameter is notnull.- Type Parameters:
V- the type of the value- Parameters:
valueAndTimestamp- aValueAndTimestampinstance; can benull- Returns:
- the wrapped
valueofvalueAndTimestampif notnull; otherwisenull
-
value
-
timestamp
public long timestamp() -
toString
-
equals
-
hashCode
public int hashCode()
-