Materialized<K, V, S> as(
String storeName)
Materialized<K, V, KeyValueStore<Bytes, byte[]>> as(
KeyValueBytesStoreSupplier supplier)
Materialized<K, V, SessionStore<Bytes, byte[]>> as(
SessionBytesStoreSupplier supplier)
Materialized<K, V, WindowStore<Bytes, byte[]>> as(
WindowBytesStoreSupplier supplier)
Materialized<K, V, S> with(
Serde<K> keySerde,
Serde<V> valueSerde)
Materialized — Metadata for State Store Materialized View
Materialized provides optional parameters that describe how to materialize a state store (as a KTable):
-
Name of the state store
Materialized is used for the following:
-
In High-Level Stream Processing DSL to create KTables and global KTables
-
KTable API
-
For
count,reduceandaggregateoperators in KGroupedStream, KGroupedTable, SessionWindowedKStream, TimeWindowedKStream
Materialized is created using the factory methods.
A Materialized instance can futher be configured using the "with" methods.
| Method | Description |
|---|---|
|
Creates a |
|
Creates a |
|
Creates a |
|
Creates a |
|
Creates a |
|
|
|
Creates a |
Scala API for Kafka Streams
Scala API for Kafka Streams makes the optional Materialized metadata an implicit parameter in the KStream API.
Moreover, ImplicitConversions object defines materializedFromSerde implicit method that creates a Materialized instance with the key and value Serde objects available in implicit scope.
Scala API for Kafka Streams also defines Materialized object with `with` and as factory methods that use implicit key and value Serde objects.