Class Joined<K,V,VO>

java.lang.Object
org.apache.kafka.streams.kstream.Joined<K,V,VO>

public class Joined<K,V,VO> extends Object
The Joined class represents optional params that can be passed to KStream#join(KTable,...) and KStream#leftJoin(KTable,...) operations.
  • Field Details

    • keySerde

      protected final Serde<K> keySerde
    • valueSerde

      protected final Serde<V> valueSerde
    • otherValueSerde

      protected final Serde<VO> otherValueSerde
    • name

      protected final String name
    • gracePeriod

      protected final Duration gracePeriod
  • Constructor Details

    • Joined

      protected Joined(Joined<K,V,VO> joined)
  • Method Details

    • with

      public static <K, V, VO> Joined<K,V,VO> with(Serde<K> keySerde, Serde<V> valueSerde, Serde<VO> otherValueSerde)
      Create an instance of Joined with key, value, and otherValue Serde instances. null values are accepted and will be replaced by the default serdes as defined in config.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      keySerde - the key serde to use. If null the default key serde from config will be used
      valueSerde - the value serde to use. If null the default value serde from config will be used
      otherValueSerde - the otherValue serde to use. If null the default value serde from config will be used
      Returns:
      new Joined instance with the provided serdes
    • with

      public static <K, V, VO> Joined<K,V,VO> with(Serde<K> keySerde, Serde<V> valueSerde, Serde<VO> otherValueSerde, String name)
      Create an instance of Joined with key, value, and otherValue Serde instances. null values are accepted and will be replaced by the default serdes as defined in config.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      keySerde - the key serde to use. If null the default key serde from config will be used
      valueSerde - the value serde to use. If null the default value serde from config will be used
      otherValueSerde - the otherValue serde to use. If null the default value serde from config will be used
      name - the name used as the base for naming components of the join including any repartition topics
      Returns:
      new Joined instance with the provided serdes
    • with

      public static <K, V, VO> Joined<K,V,VO> with(Serde<K> keySerde, Serde<V> valueSerde, Serde<VO> otherValueSerde, String name, Duration gracePeriod)
      Create an instance of Joined with key, value, and otherValue Serde instances. null values are accepted and will be replaced by the default serdes as defined in config.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      keySerde - the key serde to use. If null the default key serde from config will be used
      valueSerde - the value serde to use. If null the default value serde from config will be used
      otherValueSerde - the otherValue serde to use. If null the default value serde from config will be used
      name - the name used as the base for naming components of the join including any repartition topics
      gracePeriod - stream buffer time
      Returns:
      new Joined instance with the provided serdes
    • keySerde

      public static <K, V, VO> Joined<K,V,VO> keySerde(Serde<K> keySerde)
      Create an instance of Joined with a key Serde. null values are accepted and will be replaced by the default key serde as defined in config.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      keySerde - the key serde to use. If null the default key serde from config will be used
      Returns:
      new Joined instance configured with the keySerde
    • valueSerde

      public static <K, V, VO> Joined<K,V,VO> valueSerde(Serde<V> valueSerde)
      Create an instance of Joined with a value Serde. null values are accepted and will be replaced by the default value serde as defined in config.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      valueSerde - the value serde to use. If null the default value serde from config will be used
      Returns:
      new Joined instance configured with the valueSerde
    • otherValueSerde

      public static <K, V, VO> Joined<K,V,VO> otherValueSerde(Serde<VO> otherValueSerde)
      Create an instance of Joined with an other value Serde. null values are accepted and will be replaced by the default value serde as defined in config.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      otherValueSerde - the otherValue serde to use. If null the default value serde from config will be used
      Returns:
      new Joined instance configured with the otherValueSerde
    • as

      public static <K, V, VO> Joined<K,V,VO> as(String name)
      Create an instance of Joined with base name for all components of the join, this may include any repartition topics created to complete the join.
      Type Parameters:
      K - key type
      V - value type
      VO - other value type
      Parameters:
      name - the name used as the base for naming components of the join including any repartition topics
      Returns:
      new Joined instance configured with the name
    • withKeySerde

      public Joined<K,V,VO> withKeySerde(Serde<K> keySerde)
      Set the key Serde to be used. Null values are accepted and will be replaced by the default key serde as defined in config
      Parameters:
      keySerde - the key serde to use. If null the default key serde from config will be used
      Returns:
      new Joined instance configured with the name
    • withValueSerde

      public Joined<K,V,VO> withValueSerde(Serde<V> valueSerde)
      Set the value Serde to be used. Null values are accepted and will be replaced by the default value serde as defined in config
      Parameters:
      valueSerde - the value serde to use. If null the default value serde from config will be used
      Returns:
      new Joined instance configured with the valueSerde
    • withOtherValueSerde

      public Joined<K,V,VO> withOtherValueSerde(Serde<VO> otherValueSerde)
      Set the otherValue Serde to be used. Null values are accepted and will be replaced by the default value serde as defined in config
      Parameters:
      otherValueSerde - the otherValue serde to use. If null the default value serde from config will be used
      Returns:
      new Joined instance configured with the valueSerde
    • withName

      public Joined<K,V,VO> withName(String name)
      Set the base name used for all components of the join, this may include any repartition topics created to complete the join.
      Parameters:
      name - the name used as the base for naming components of the join including any repartition topics
      Returns:
      new Joined instance configured with the name
    • withGracePeriod

      public Joined<K,V,VO> withGracePeriod(Duration gracePeriod)
      Set the grace period on the stream side of the join. Records will enter a buffer before being processed. Out of order records in the grace period will be processed in timestamp order. Late records, out of the grace period, will be executed right as they come in, if it is past the table history retention this could result in a null join. Long gaps in stream side arriving records will cause records to be delayed in processing.
      Parameters:
      gracePeriod - the duration of the grace period. Must be less than the joining table's history retention.
      Returns:
      new Joined instance configured with the gracePeriod
    • gracePeriod

      public Duration gracePeriod()
    • keySerde

      public Serde<K> keySerde()
    • valueSerde

      public Serde<V> valueSerde()
    • otherValueSerde

      public Serde<VO> otherValueSerde()