Package io.debezium.config
Class Configuration.Builder
- java.lang.Object
-
- io.debezium.config.Configuration.Builder
-
- All Implemented Interfaces:
Configuration.ConfigBuilder<Configuration,Configuration.Builder>
- Enclosing interface:
- Configuration
public static class Configuration.Builder extends Object implements Configuration.ConfigBuilder<Configuration,Configuration.Builder>
A builder of Configuration objects.
-
-
Field Summary
Fields Modifier and Type Field Description private Propertiesprops
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder()protectedBuilder(Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Configuration.Builderapply(Consumer<Configuration.Builder> function)Apply the function to this builder.Configurationbuild()Build and return the immutable configuration.Configuration.BuilderchangeString(Field field, Function<String,String> function)Apply the function to this builder to change a potentially existing string field.protected Configuration.BuilderchangeString(String key, String defaultValue, Function<String,String> function)Configuration.BuilderchangeString(String key, Function<String,String> function)Apply the function to this builder to change a potentially existing string field.Configuration.Builderwith(String key, String value)Associate the given value with the specified key.Configuration.BuilderwithDefault(String key, String value)If there is no field with the specified key, then associate the given value with the specified key.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.config.Configuration.ConfigBuilder
changeBoolean, changeBoolean, changeDouble, changeDouble, changeFloat, changeFloat, changeInteger, changeInteger, changeLong, changeLong, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault, withDefault
-
-
-
-
Field Detail
-
props
private final Properties props
-
-
Constructor Detail
-
Builder
protected Builder()
-
Builder
protected Builder(Properties props)
-
-
Method Detail
-
with
public Configuration.Builder with(String key, String value)
Description copied from interface:Configuration.ConfigBuilderAssociate the given value with the specified key.- Specified by:
within interfaceConfiguration.ConfigBuilder<Configuration,Configuration.Builder>- Parameters:
key- the keyvalue- the value- Returns:
- this builder object so methods can be chained together; never null
-
withDefault
public Configuration.Builder withDefault(String key, String value)
Description copied from interface:Configuration.ConfigBuilderIf there is no field with the specified key, then associate the given value with the specified key.- Specified by:
withDefaultin interfaceConfiguration.ConfigBuilder<Configuration,Configuration.Builder>- Parameters:
key- the keyvalue- the value- Returns:
- this builder object so methods can be chained together; never null
-
apply
public Configuration.Builder apply(Consumer<Configuration.Builder> function)
Description copied from interface:Configuration.ConfigBuilderApply the function to this builder.- Specified by:
applyin interfaceConfiguration.ConfigBuilder<Configuration,Configuration.Builder>- Parameters:
function- the predefined field for the key- Returns:
- this builder object so methods can be chained together; never null
-
changeString
public Configuration.Builder changeString(String key, Function<String,String> function)
Description copied from interface:Configuration.ConfigBuilderApply the function to this builder to change a potentially existing string field.- Specified by:
changeStringin interfaceConfiguration.ConfigBuilder<Configuration,Configuration.Builder>- Parameters:
key- the keyfunction- the function that computes the new value given a possibly-existing value; may not be null- Returns:
- this builder object so methods can be chained together; never null
-
changeString
public Configuration.Builder changeString(Field field, Function<String,String> function)
Description copied from interface:Configuration.ConfigBuilderApply the function to this builder to change a potentially existing string field.- Specified by:
changeStringin interfaceConfiguration.ConfigBuilder<Configuration,Configuration.Builder>- Parameters:
field- the predefined field for the keyfunction- the function that computes the new value given a possibly-existing value; may not be null- Returns:
- this builder object so methods can be chained together; never null
-
changeString
protected Configuration.Builder changeString(String key, String defaultValue, Function<String,String> function)
-
build
public Configuration build()
Description copied from interface:Configuration.ConfigBuilderBuild and return the immutable configuration.- Specified by:
buildin interfaceConfiguration.ConfigBuilder<Configuration,Configuration.Builder>- Returns:
- the immutable configuration; never null
-
-