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 Details

    • make

      public static <V> ValueAndTimestamp<V> make(V value, long timestamp)
      Create a new ValueAndTimestamp instance if the provide value is not null.
      Type Parameters:
      V - the type of the value
      Parameters:
      value - the value
      timestamp - the timestamp
      Returns:
      a new ValueAndTimestamp instance if the provide value is not null; otherwise null is returned
    • getValueOrNull

      public static <V> V getValueOrNull(ValueAndTimestamp<V> valueAndTimestamp)
      Return the wrapped value of the given valueAndTimestamp parameter if the parameter is not null.
      Type Parameters:
      V - the type of the value
      Parameters:
      valueAndTimestamp - a ValueAndTimestamp instance; can be null
      Returns:
      the wrapped value of valueAndTimestamp if not null; otherwise null
    • value

      public V value()
    • timestamp

      public long timestamp()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object