Class AbstractStoreBuilder<K,V,T extends StateStore>
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.AbstractStoreBuilder<K,V,T>
-
- All Implemented Interfaces:
StoreBuilder<T>
- Direct Known Subclasses:
KeyValueStoreBuilder,SessionStoreBuilder,TimestampedKeyValueStoreBuilder,TimestampedWindowStoreBuilder,WindowStoreBuilder
public abstract class AbstractStoreBuilder<K,V,T extends StateStore> extends java.lang.Object implements StoreBuilder<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringname
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theStateStore.booleanloggingEnabled()java.lang.Stringname()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 thisStoreBuilder.StoreBuilder<T>withLoggingEnabled(java.util.Map<java.lang.String,java.lang.String> config)Maintain a changelog for any changes made to the store.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.kafka.streams.state.StoreBuilder
build
-
-
-
-
Method Detail
-
withCachingEnabled
public StoreBuilder<T> withCachingEnabled()
Description copied from interface:StoreBuilderEnable caching on the store.- Specified by:
withCachingEnabledin interfaceStoreBuilder<K>- Returns:
- this
-
withCachingDisabled
public StoreBuilder<T> withCachingDisabled()
Description copied from interface:StoreBuilderDisable caching on the store.- Specified by:
withCachingDisabledin interfaceStoreBuilder<K>- Returns:
- this
-
withLoggingEnabled
public StoreBuilder<T> withLoggingEnabled(java.util.Map<java.lang.String,java.lang.String> config)
Description copied from interface:StoreBuilderMaintain a changelog for any changes made to the store. Use the provided config to set the config of the changelog topic.- Specified by:
withLoggingEnabledin interfaceStoreBuilder<K>- Parameters:
config- config applied to the changelog topic- Returns:
- this
-
withLoggingDisabled
public StoreBuilder<T> withLoggingDisabled()
Description copied from interface:StoreBuilderDisable the changelog for store built by thisStoreBuilder. This will turn off fault-tolerance for your store. By default the changelog is enabled.- Specified by:
withLoggingDisabledin interfaceStoreBuilder<K>- Returns:
- this
-
logConfig
public java.util.Map<java.lang.String,java.lang.String> logConfig()
Description copied from interface:StoreBuilderReturns a Map containing any log configs that will be used when creating the changelog for theStateStore.Note: any unrecognized configs will be ignored by the Kafka brokers.
- Specified by:
logConfigin interfaceStoreBuilder<K>- Returns:
- Map containing any log configs to be used when creating the changelog for the
StateStoreIfloggingEnabledreturns false, this function will always return an empty map
-
loggingEnabled
public boolean loggingEnabled()
- Specified by:
loggingEnabledin interfaceStoreBuilder<K>- Returns:
trueif theStateStoreshould have logging enabled
-
name
public java.lang.String name()
Description copied from interface:StoreBuilderReturn the name of this state store builder. This must be a valid Kafka topic name; valid characters are ASCII alphanumerics, '.', '_' and '-'.- Specified by:
namein interfaceStoreBuilder<K>- Returns:
- the name of this state store builder
-
-