Class InMemoryTimeOrderedKeyValueBuffer.Builder
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.InMemoryTimeOrderedKeyValueBuffer.Builder
-
- All Implemented Interfaces:
StoreBuilder<StateStore>
- Enclosing class:
- InMemoryTimeOrderedKeyValueBuffer
public static class InMemoryTimeOrderedKeyValueBuffer.Builder extends java.lang.Object implements StoreBuilder<StateStore>
-
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String storeName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StateStore
build()
Build the store as defined by the builder.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
.boolean
loggingEnabled()
java.lang.String
name()
Return the name of this state store builder.StoreBuilder<StateStore>
withCachingDisabled()
As of 2.1, there's no way for users to directly interact with the buffer, so this method is implemented solely to be called by Streams (which it will do based on thecache.max.bytes.buffering
config.StoreBuilder<StateStore>
withCachingEnabled()
As of 2.1, there's no way for users to directly interact with the buffer, so this method is implemented solely to be called by Streams (which it will do based on thecache.max.bytes.buffering
config.StoreBuilder<StateStore>
withLoggingDisabled()
Disable the changelog for store built by thisStoreBuilder
.StoreBuilder<StateStore>
withLoggingEnabled(java.util.Map<java.lang.String,java.lang.String> config)
Maintain a changelog for any changes made to the store.
-
-
-
Method Detail
-
withCachingEnabled
public StoreBuilder<StateStore> withCachingEnabled()
As of 2.1, there's no way for users to directly interact with the buffer, so this method is implemented solely to be called by Streams (which it will do based on thecache.max.bytes.buffering
config. It's currently a no-op.- Specified by:
withCachingEnabled
in interfaceStoreBuilder<StateStore>
- Returns:
- this
-
withCachingDisabled
public StoreBuilder<StateStore> withCachingDisabled()
As of 2.1, there's no way for users to directly interact with the buffer, so this method is implemented solely to be called by Streams (which it will do based on thecache.max.bytes.buffering
config. It's currently a no-op.- Specified by:
withCachingDisabled
in interfaceStoreBuilder<StateStore>
- Returns:
- this
-
withLoggingEnabled
public StoreBuilder<StateStore> withLoggingEnabled(java.util.Map<java.lang.String,java.lang.String> config)
Description copied from interface:StoreBuilder
Maintain a changelog for any changes made to the store. Use the provided config to set the config of the changelog topic.- Specified by:
withLoggingEnabled
in interfaceStoreBuilder<StateStore>
- Parameters:
config
- config applied to the changelog topic- Returns:
- this
-
withLoggingDisabled
public StoreBuilder<StateStore> withLoggingDisabled()
Description copied from interface:StoreBuilder
Disable the changelog for store built by thisStoreBuilder
. This will turn off fault-tolerance for your store. By default the changelog is enabled.- Specified by:
withLoggingDisabled
in interfaceStoreBuilder<StateStore>
- Returns:
- this
-
build
public StateStore build()
Description copied from interface:StoreBuilder
Build the store as defined by the builder.- Specified by:
build
in interfaceStoreBuilder<StateStore>
- Returns:
- the built
StateStore
-
logConfig
public java.util.Map<java.lang.String,java.lang.String> logConfig()
Description copied from interface:StoreBuilder
Returns 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:
logConfig
in interfaceStoreBuilder<StateStore>
- Returns:
- Map containing any log configs to be used when creating the changelog for the
StateStore
IfloggingEnabled
returns false, this function will always return an empty map
-
loggingEnabled
public boolean loggingEnabled()
- Specified by:
loggingEnabled
in interfaceStoreBuilder<StateStore>
- Returns:
true
if theStateStore
should have logging enabled
-
name
public java.lang.String name()
Description copied from interface:StoreBuilder
Return the name of this state store builder. This must be a valid Kafka topic name; valid characters are ASCII alphanumerics, '.', '_' and '-'.- Specified by:
name
in interfaceStoreBuilder<StateStore>
- Returns:
- the name of this state store builder
-
-