Class KV<K,​V>

    • Constructor Detail

      • KV

        public KV​(K key,
                  V value)
        Creates a new KV instance.
        Parameters:
        key - the record key.
        value - the record value.
      • KV

        public KV​(K key,
                  V value,
                  Long timestamp)
        Creates a new KV instance.
        Parameters:
        key - the record key.
        value - the record value.
        timestamp - the record timestamp, can be null.
    • Method Detail

      • of

        public static <K,​V> KV<K,​V> of​(K key,
                                                   V value)
      • of

        public static <K,​V> KV<K,​V> of​(K key,
                                                   V value,
                                                   Long timestamp)
      • of

        public static <K,​V> KV<K,​V> of​(org.apache.kafka.streams.KeyValue<K,​V> kv)
      • nullableKey

        public Optional<K> nullableKey()
      • key

        public K key()
      • nullableValue

        public Optional<V> nullableValue()
      • value

        public V value()
      • timestamp

        public Long timestamp()
      • toKafkaKeyValue

        public org.apache.kafka.streams.KeyValue<K,​V> toKafkaKeyValue()
      • isNullKey

        public boolean isNullKey()
      • swap

        public KV<V,​K> swap()
        Swaps the key and value.
        Returns:
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object