Class StreamsContext

java.lang.Object
com.bakdata.kafka.streams.kstream.StreamsContext

public final class StreamsContext extends Object
Provides context for the configured Kafka Streams application environment, i.e., topic configuration and StreamsConfig
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamsContext(@NonNull StreamsTopicConfig topics, @NonNull com.bakdata.kafka.Configurator configurator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
     
    <KR, VR> BranchedKStreamX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.BranchedKStream<KR,VR> stream)
    Wrap a BranchedKStream and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> CogroupedKStreamX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.CogroupedKStream<KR,VR> stream)
    Wrap a CogroupedKStream and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> KGroupedStreamX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.KGroupedStream<KR,VR> stream)
    Wrap a KGroupedStream and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> KGroupedTableX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.KGroupedTable<KR,VR> table)
    Wrap a KGroupedTable and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> KStreamX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.KStream<KR,VR> stream)
    Wrap a KStream and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> KTableX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.KTable<KR,VR> table)
    Wrap a KTable and add methods to simplify Serde configuration, error handling, and topic access
    wrap(org.apache.kafka.streams.kstream.SessionWindowedCogroupedKStream<KR,VR> stream)
    Wrap a SessionWindowedCogroupedKStream and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> SessionWindowedKStreamX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.SessionWindowedKStream<KR,VR> stream)
    Wrap a SessionWindowedKStream and add methods to simplify Serde configuration, error handling, and topic access
    wrap(org.apache.kafka.streams.kstream.TimeWindowedCogroupedKStream<KR,VR> stream)
    Wrap a TimeWindowedCogroupedKStream and add methods to simplify Serde configuration, error handling, and topic access
    <KR, VR> TimeWindowedKStreamX<KR,VR>
    wrap(org.apache.kafka.streams.kstream.TimeWindowedKStream<KR,VR> stream)
    Wrap a TimeWindowedKStream and add methods to simplify Serde configuration, error handling, and topic access

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • StreamsContext

      public StreamsContext(@NonNull @NonNull StreamsTopicConfig topics, @NonNull @NonNull com.bakdata.kafka.Configurator configurator)
  • Method Details

    • wrap

      public <KR, VR> KStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.KStream<KR,VR> stream)
      Wrap a KStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      KStreamX
    • wrap

      public <KR, VR> KGroupedStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.KGroupedStream<KR,VR> stream)
      Wrap a KGroupedStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      KGroupedStreamX
    • wrap

      public <KR, VR> TimeWindowedKStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.TimeWindowedKStream<KR,VR> stream)
      Wrap a TimeWindowedKStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      TimeWindowedKStreamX
    • wrap

      public <KR, VR> SessionWindowedKStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.SessionWindowedKStream<KR,VR> stream)
      Wrap a SessionWindowedKStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      SessionWindowedKStreamX
    • wrap

      public <KR, VR> TimeWindowedCogroupedKStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.TimeWindowedCogroupedKStream<KR,VR> stream)
      Wrap a TimeWindowedCogroupedKStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      TimeWindowedCogroupedKStreamX
    • wrap

      public <KR, VR> SessionWindowedCogroupedKStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.SessionWindowedCogroupedKStream<KR,VR> stream)
      Wrap a SessionWindowedCogroupedKStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      SessionWindowedCogroupedKStreamX
    • wrap

      public <KR, VR> CogroupedKStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.CogroupedKStream<KR,VR> stream)
      Wrap a CogroupedKStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      CogroupedKStreamX
    • wrap

      public <KR, VR> BranchedKStreamX<KR,VR> wrap(org.apache.kafka.streams.kstream.BranchedKStream<KR,VR> stream)
      Wrap a BranchedKStream and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the stream
      VR - type of values in the stream
      Parameters:
      stream - stream to be wrapped
      Returns:
      BranchedKStreamX
    • wrap

      public <KR, VR> KTableX<KR,VR> wrap(org.apache.kafka.streams.kstream.KTable<KR,VR> table)
      Wrap a KTable and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the table
      VR - type of values in the table
      Parameters:
      table - table to be wrapped
      Returns:
      KTableX
    • wrap

      public <KR, VR> KGroupedTableX<KR,VR> wrap(org.apache.kafka.streams.kstream.KGroupedTable<KR,VR> table)
      Wrap a KGroupedTable and add methods to simplify Serde configuration, error handling, and topic access
      Type Parameters:
      KR - type of keys in the table
      VR - type of values in the table
      Parameters:
      table - table to be wrapped
      Returns:
      KGroupedTableX
    • 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