public abstract class AbstractStoreBuilder<K,V,T extends StateStore> extends java.lang.Object implements StoreBuilder<T>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name |
Constructor and Description |
---|
AbstractStoreBuilder(java.lang.String name,
org.apache.kafka.common.serialization.Serde<K> keySerde,
org.apache.kafka.common.serialization.Serde<V> valueSerde,
org.apache.kafka.common.utils.Time time) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
logConfig()
Returns a Map containing any log configs that will be used when creating the changelog for the
StateStore . |
boolean |
loggingEnabled() |
java.lang.String |
name()
Return the name of this state store builder.
|
StoreBuilder<T> |
withCachingDisabled()
Disable caching on the store.
|
StoreBuilder<T> |
withCachingEnabled()
Enable caching on the store.
|
StoreBuilder<T> |
withLoggingDisabled()
Disable the changelog for store built by this
StoreBuilder . |
StoreBuilder<T> |
withLoggingEnabled(java.util.Map<java.lang.String,java.lang.String> config)
Maintain a changelog for any changes made to the store.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build
public StoreBuilder<T> withCachingEnabled()
StoreBuilder
withCachingEnabled
in interface StoreBuilder<T extends StateStore>
public StoreBuilder<T> withCachingDisabled()
StoreBuilder
withCachingDisabled
in interface StoreBuilder<T extends StateStore>
public StoreBuilder<T> withLoggingEnabled(java.util.Map<java.lang.String,java.lang.String> config)
StoreBuilder
withLoggingEnabled
in interface StoreBuilder<T extends StateStore>
config
- config applied to the changelog topicpublic StoreBuilder<T> withLoggingDisabled()
StoreBuilder
StoreBuilder
.
This will turn off fault-tolerance for your store.
By default the changelog is enabled.withLoggingDisabled
in interface StoreBuilder<T extends StateStore>
public java.util.Map<java.lang.String,java.lang.String> logConfig()
StoreBuilder
StateStore
.
Note: any unrecognized configs will be ignored by the Kafka brokers.
logConfig
in interface StoreBuilder<T extends StateStore>
StateStore
If loggingEnabled
returns false, this function will always return an empty mappublic boolean loggingEnabled()
loggingEnabled
in interface StoreBuilder<T extends StateStore>
true
if the StateStore
should have logging enabledpublic java.lang.String name()
StoreBuilder
name
in interface StoreBuilder<T extends StateStore>