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
StateStore
to the topology.Adds a global
StateStore
to 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
, orValueTransformer
before it can be used.It is required to connect state stores to
Processor
,Transformer
, orValueTransformer
before they can be used.- builder
the builder used to obtain this state store
StateStore
instance- returns
the underlying Java abstraction
StreamsBuilder
after adding theStateStore
- Exceptions thrown
org.apache.kafka.streams.errors.TopologyException
if 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
Topology
that represents the specified processing logic and accepts aProperties
instance used to indicate whether to optimize topology or not.Returns the
Topology
that represents the specified processing logic and accepts aProperties
instance used to indicate whether to optimize topology or not.- props
the
Properties
used for building possibly optimized topology- returns
the
Topology
that 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()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def globalTable[K, V](topic: String, materialized: Materialized[K, V, ByteArrayKeyValueStore])(implicit consumed: Consumed[K, V]): GlobalKTable[K, V]
Create a
GlobalKTable
from the specified topic.Create a
GlobalKTable
from the specified topic. The resultingGlobalKTable
will be materialized in a localKeyValueStore
configured with the provided instance ofMaterialized
. The serializers from the implicitConsumed
instance will be used.- topic
the topic name
- materialized
the instance of
Materialized
used to materialize a state store- returns
a
GlobalKTable
for 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
GlobalKTable
from the specified topic.Create a
GlobalKTable
from the specified topic. The serializers from the implicitConsumed
instance will be used. Input records withnull
key will be dropped.- topic
the topic name
- returns
a
GlobalKTable
for the specified topic
- See also
org.apache.kafka.streams.StreamsBuilder#globalTable
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- 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 Consumed
instance provides the values ofauto.offset.reset
strategy,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
Materialized
used 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 Consumed
instance provides the values ofauto.offset.reset
strategy,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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()
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
StateStore
to the topology.Adds a global
StateStore
to 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