class StreamsBuilder extends AnyRef
Wraps the Java class StreamsBuilder and delegates method calls to the underlying Java object.
- Alphabetic
- By Inheritance
- StreamsBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new StreamsBuilder(inner: streams.StreamsBuilder = new StreamsBuilderJ)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addGlobalStore[K, V](storeBuilder: StoreBuilder[_ <: StateStore], topic: String, consumed: Consumed[K, V], stateUpdateSupplier: ProcessorSupplier[K, V, Void, Void]): streams.StreamsBuilder
Adds a global
StateStoreto the topology.Adds a global
StateStoreto the topology. Global stores should not be added toProcessor,Transformer, orValueTransformer(in contrast to regular stores).It is not required to connect a global store to
Processor,Transformer, orValueTransformer; those have read-only access to all global stores by default.- See also
org.apache.kafka.streams.StreamsBuilder#addGlobalStore
- def addStateStore(builder: StoreBuilder[_ <: StateStore]): streams.StreamsBuilder
Adds a state store to the underlying
Topology.Adds a state store to the underlying
Topology. The store must still be "connected" to aProcessor,Transformer, orValueTransformerbefore it can be used.It is required to connect state stores to
Processor,Transformer, orValueTransformerbefore they can be used.- builder
the builder used to obtain this state store
StateStoreinstance- returns
the underlying Java abstraction
StreamsBuilderafter adding theStateStore
- Exceptions thrown
org.apache.kafka.streams.errors.TopologyExceptionif state store supplier is already added- See also
org.apache.kafka.streams.StreamsBuilder#addStateStore
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def build(props: Properties): Topology
Returns the
Topologythat represents the specified processing logic and accepts aPropertiesinstance used to indicate whether to optimize topology or not.Returns the
Topologythat represents the specified processing logic and accepts aPropertiesinstance used to indicate whether to optimize topology or not.- props
the
Propertiesused for building possibly optimized topology- returns
the
Topologythat represents the specified processing logic
- See also
org.apache.kafka.streams.StreamsBuilder#build
- def build(): Topology
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def globalTable[K, V](topic: String, materialized: Materialized[K, V, ByteArrayKeyValueStore])(implicit consumed: Consumed[K, V]): GlobalKTable[K, V]
Create a
GlobalKTablefrom the specified topic.Create a
GlobalKTablefrom the specified topic. The resultingGlobalKTablewill be materialized in a localKeyValueStoreconfigured with the provided instance ofMaterialized. The serializers from the implicitConsumedinstance will be used.- topic
the topic name
- materialized
the instance of
Materializedused to materialize a state store- returns
a
GlobalKTablefor the specified topic
- See also
org.apache.kafka.streams.StreamsBuilder#globalTable
- def globalTable[K, V](topic: String)(implicit consumed: Consumed[K, V]): GlobalKTable[K, V]
Create a
GlobalKTablefrom the specified topic.Create a
GlobalKTablefrom the specified topic. The serializers from the implicitConsumedinstance will be used. Input records withnullkey will be dropped.- topic
the topic name
- returns
a
GlobalKTablefor the specified topic
- See also
org.apache.kafka.streams.StreamsBuilder#globalTable
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def stream[K, V](topicPattern: Pattern)(implicit consumed: Consumed[K, V]): KStream[K, V]
Create a kstream.KStream from the specified topic pattern.
Create a kstream.KStream from the specified topic pattern.
- topicPattern
the topic name pattern
- returns
a kstream.KStream for the specified topics
- See also
#stream(String)
org.apache.kafka.streams.StreamsBuilder#stream
- def stream[K, V](topics: Set[String])(implicit consumed: Consumed[K, V]): KStream[K, V]
Create a kstream.KStream from the specified topics.
Create a kstream.KStream from the specified topics.
- topics
the topic names
- returns
a kstream.KStream for the specified topics
- See also
#stream(String)
org.apache.kafka.streams.StreamsBuilder#stream
- def stream[K, V](topic: String)(implicit consumed: Consumed[K, V]): KStream[K, V]
Create a kstream.KStream from the specified topic.
Create a kstream.KStream from the specified topic.
The
implicit Consumedinstance provides the values ofauto.offset.resetstrategy,TimestampExtractor, key and value deserializers etc. If the implicit is not found in scope, compiler error will result.A convenient alternative is to have the necessary implicit serdes in scope, which will be implicitly converted to generate an instance of
Consumed. @see ImplicitConversions.// Brings all implicit conversions in scope import ImplicitConversions._ // Bring implicit default serdes in scope import Serdes._ val builder = new StreamsBuilder() // stream function gets the implicit Consumed which is constructed automatically // from the serdes through the implicits in ImplicitConversions#consumedFromSerde val userClicksStream: KStream[String, Long] = builder.stream(userClicksTopic)
- topic
the topic name
- returns
a kstream.KStream for the specified topic
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def table[K, V](topic: String, materialized: Materialized[K, V, ByteArrayKeyValueStore])(implicit consumed: Consumed[K, V]): KTable[K, V]
Create a kstream.KTable from the specified topic.
Create a kstream.KTable from the specified topic.
- topic
the topic name
- materialized
the instance of
Materializedused to materialize a state store- returns
a kstream.KTable for the specified topic
- See also
#table(String)
org.apache.kafka.streams.StreamsBuilder#table
- def table[K, V](topic: String)(implicit consumed: Consumed[K, V]): KTable[K, V]
Create a kstream.KTable from the specified topic.
Create a kstream.KTable from the specified topic.
The
implicit Consumedinstance provides the values ofauto.offset.resetstrategy,TimestampExtractor, key and value deserializers etc. If the implicit is not found in scope, compiler error will result.A convenient alternative is to have the necessary implicit serdes in scope, which will be implicitly converted to generate an instance of
Consumed. @see ImplicitConversions.// Brings all implicit conversions in scope import ImplicitConversions._ // Bring implicit default serdes in scope import Serdes._ val builder = new StreamsBuilder() // stream function gets the implicit Consumed which is constructed automatically // from the serdes through the implicits in ImplicitConversions#consumedFromSerde val userClicksStream: KTable[String, Long] = builder.table(userClicksTopic)
- topic
the topic name
- returns
a kstream.KTable for the specified topic
- See also
org.apache.kafka.streams.StreamsBuilder#table
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def addGlobalStore[K, V](storeBuilder: StoreBuilder[_ <: StateStore], topic: String, consumed: Consumed[K, V], stateUpdateSupplier: ProcessorSupplier[K, V]): streams.StreamsBuilder
Adds a global
StateStoreto the topology.Adds a global
StateStoreto the topology. Global stores should not be added toProcessor,Transformer, orValueTransformer(in contrast to regular stores).It is not required to connect a global store to
Processor,Transformer, orValueTransformer; those have read-only access to all global stores by default.- Annotations
- @deprecated
- Deprecated
(Since version 2.7.0) Use #addGlobalStore(StoreBuilder, String, Consumed, org.apache.kafka.streams.processor.api.ProcessorSupplier) instead.
- See also
org.apache.kafka.streams.StreamsBuilder#addGlobalStore
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated