Package org.apache.kafka.streams.state
Interface StoreBuilder<T extends StateStore>
- Type Parameters:
- T- the type of store to build
public interface StoreBuilder<T extends StateStore>
Build a 
StateStore wrapped with optional caching and logging.- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build the store as defined by the builder.Returns a Map containing any log configs that will be used when creating the changelog for theStateStore.booleanname()Return the name of this state store builder.Disable caching on the store.Enable caching on the store.Disable the changelog for store built by thisStoreBuilder.withLoggingEnabled(Map<String, String> config) Maintain a changelog for any changes made to the store.
- 
Method Details- 
withCachingEnabledStoreBuilder<T> withCachingEnabled()Enable caching on the store.- Returns:
- this
 
- 
withCachingDisabledStoreBuilder<T> withCachingDisabled()Disable caching on the store.- Returns:
- this
 
- 
withLoggingEnabledMaintain a changelog for any changes made to the store. Use the provided config to set the config of the changelog topic.- Parameters:
- config- config applied to the changelog topic
- Returns:
- this
 
- 
withLoggingDisabledStoreBuilder<T> withLoggingDisabled()Disable the changelog for store built by thisStoreBuilder. This will turn off fault-tolerance for your store. By default the changelog is enabled.- Returns:
- this
 
- 
buildT build()Build the store as defined by the builder.- Returns:
- the built StateStore
 
- 
logConfigReturns 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. - 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
 
- 
loggingEnabledboolean loggingEnabled()- Returns:
- trueif the- StateStoreshould have logging enabled
 
- 
nameString name()Return the name of this state store builder. This must be a valid Kafka topic name; valid characters are ASCII alphanumerics, '.', '_' and '-'.- Returns:
- the name of this state store builder
 
 
-