Class VersionedRecord<V>

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

public final class VersionedRecord<V> extends Object
Combines a value (from a key-value record) with a timestamp, for use as the return type from VersionedKeyValueStore.get(Object, long) and related methods.
  • Constructor Details

    • VersionedRecord

      public VersionedRecord(V value, long timestamp)
      Create a new VersionedRecord instance. value cannot be null.
      Parameters:
      value - The value
      timestamp - The type of the result returned by this query.
    • VersionedRecord

      public VersionedRecord(V value, long timestamp, long validTo)
      Create a new VersionedRecord instance. value cannot be null.
      Parameters:
      value - The value
      timestamp - The timestamp
      validTo - The exclusive upper bound of the validity interval
  • Method Details

    • value

      public V value()
    • timestamp

      public long timestamp()
    • validTo

      public Optional<Long> validTo()
    • 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