Class ValueTimestampHeaders<V>

java.lang.Object
org.apache.kafka.streams.state.ValueTimestampHeaders<V>
Type Parameters:
V - the value type

public final class ValueTimestampHeaders<V> extends Object
Combines a value with its timestamp and associated record headers.
  • Method Details

    • make

      public static <V> ValueTimestampHeaders<V> make(V value, long timestamp, Headers headers)
      Create a new ValueTimestampHeaders instance if the provided value is not null.
      Type Parameters:
      V - the type of the value
      Parameters:
      value - the value
      timestamp - the timestamp
      headers - the headers (may be null, treated as empty)
      Returns:
      a new ValueTimestampHeaders instance if the provided value is not null; otherwise null is returned
    • makeAllowNullable

      public static <V> ValueTimestampHeaders<V> makeAllowNullable(V value, long timestamp, Headers headers)
      Create a new ValueTimestampHeaders instance. The provided value may be null.
      Type Parameters:
      V - the type of the value
      Parameters:
      value - the value (may be null)
      timestamp - the timestamp
      headers - the headers (may be null, treated as empty)
      Returns:
      a new ValueTimestampHeaders instance
    • getValueOrNull

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

      public V value()
    • timestamp

      public long timestamp()
    • headers

      public Headers headers()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object