public static final class MySqlCdcSources.Builder extends Object
Modifier and Type | Method and Description |
---|---|
StreamSource<ChangeRecord> |
build()
Returns the source based on the properties set so far.
|
MySqlCdcSources.Builder |
setClusterName(String cluster)
Logical name that identifies and provides a namespace for the
particular database server/cluster being monitored.
|
MySqlCdcSources.Builder |
setColumnBlacklist(String... columnNameRegExps)
Optional regular expressions that match the fully-qualified names of
columns that should be excluded from change event message values.
|
MySqlCdcSources.Builder |
setCustomProperty(String key,
String value)
Can be used to set any property not explicitly covered by other
methods or to override internal properties.
|
MySqlCdcSources.Builder |
setDatabaseAddress(String address)
IP address or hostname of the database server, has to be specified.
|
MySqlCdcSources.Builder |
setDatabaseBlacklist(String... dbNameRegExps)
Optional regular expressions that match database names to be excluded
from monitoring; any database name not included in the blacklist will
be monitored.
|
MySqlCdcSources.Builder |
setDatabaseClientId(int clientId)
A numeric ID of this database client, which must be unique across all
currently-running database processes in the MySQL cluster.
|
MySqlCdcSources.Builder |
setDatabasePassword(String password)
Database user password for connecting to the database server.
|
MySqlCdcSources.Builder |
setDatabasePort(int port)
Optional port number of the database server, if unspecified defaults
to the database specific default port (3306).
|
MySqlCdcSources.Builder |
setDatabaseUser(String user)
Database user for connecting to the database server.
|
MySqlCdcSources.Builder |
setDatabaseWhitelist(String... dbNameRegExps)
Optional regular expressions that match database names to be
monitored; any database name not included in the whitelist will be
excluded from monitoring.
|
MySqlCdcSources.Builder |
setReconnectBehavior(RetryStrategy retryStrategy)
Specifies how the source should behave when it detects that the
backing database has been shut down (read class javadoc for details
and special cases).
|
MySqlCdcSources.Builder |
setShouldStateBeResetOnReconnect(boolean reset)
Specifies if the source's state should be kept or discarded during
reconnect attempts to the database.
|
MySqlCdcSources.Builder |
setSslKeystoreFile(String file)
Specifies the (path to the) Java keystore file containing the
database client certificate and private key.
|
MySqlCdcSources.Builder |
setSslKeystorePassword(String password)
Password to access the private key from any specified keystore files.
|
MySqlCdcSources.Builder |
setSslMode(String mode)
Specifies whether to use an encrypted connection to the database.
|
MySqlCdcSources.Builder |
setSslTruststoreFile(String file)
Specifies the (path to the) Java truststore file containing the
collection of trusted CA certificates.
|
MySqlCdcSources.Builder |
setSslTruststorePassword(String password)
Password to unlock any specified truststore.
|
MySqlCdcSources.Builder |
setTableBlacklist(String... tableNameRegExps)
Optional regular expressions that match fully-qualified table
identifiers for tables to be excluded from monitoring; any table not
included in the blacklist will be monitored.
|
MySqlCdcSources.Builder |
setTableWhitelist(String... tableNameRegExps)
Optional regular expressions that match fully-qualified table
identifiers for tables to be monitored; any table not included in the
whitelist will be excluded from monitoring.
|
@Nonnull public MySqlCdcSources.Builder setDatabaseAddress(@Nonnull String address)
@Nonnull public MySqlCdcSources.Builder setDatabasePort(int port)
@Nonnull public MySqlCdcSources.Builder setDatabaseUser(@Nonnull String user)
@Nonnull public MySqlCdcSources.Builder setDatabasePassword(@Nonnull String password)
@Nonnull public MySqlCdcSources.Builder setClusterName(@Nonnull String cluster)
@Nonnull public MySqlCdcSources.Builder setDatabaseClientId(int clientId)
@Nonnull public MySqlCdcSources.Builder setDatabaseWhitelist(@Nonnull String... dbNameRegExps)
database
blacklist
.@Nonnull public MySqlCdcSources.Builder setDatabaseBlacklist(@Nonnull String... dbNameRegExps)
database whitelist
.@Nonnull public MySqlCdcSources.Builder setTableWhitelist(@Nonnull String... tableNameRegExps)
table blacklist
.@Nonnull public MySqlCdcSources.Builder setTableBlacklist(@Nonnull String... tableNameRegExps)
table whitelist
.@Nonnull public MySqlCdcSources.Builder setColumnBlacklist(@Nonnull String... columnNameRegExps)
@Nonnull public MySqlCdcSources.Builder setSslMode(@Nonnull String mode)
The preferred option establishes an encrypted connection if the server supports secure connections but falls back to an unencrypted connection otherwise.
The required option establishes an encrypted connection but will fail if one cannot be made for any reason.
The verify_ca option behaves like required but additionally it verifies the server TLS certificate against the configured Certificate Authority (CA) certificates and will fail if it doesn’t match any valid CA certificates.
The verify_identity option behaves like verify_ca but additionally verifies that the server certificate matches the host of the remote connection.
@Nonnull public MySqlCdcSources.Builder setSslKeystoreFile(@Nonnull String file)
Can be alternatively specified via the 'javax.net.ssl.keyStore' system or JVM property.
@Nonnull public MySqlCdcSources.Builder setSslKeystorePassword(@Nonnull String password)
This password is used to unlock the keystore file (store password), and to decrypt the private key stored in the keystore (key password)."
Can be alternatively specified via the 'javax.net.ssl.keyStorePassword' system or JVM property.
@Nonnull public MySqlCdcSources.Builder setSslTruststoreFile(@Nonnull String file)
Can be alternatively specified via the 'javax.net.ssl.trustStore' system or JVM property.
@Nonnull public MySqlCdcSources.Builder setSslTruststorePassword(@Nonnull String password)
Can be alternatively specified via the 'javax.net.ssl.trustStorePassword' system or JVM property.
@Nonnull public MySqlCdcSources.Builder setReconnectBehavior(@Nonnull RetryStrategy retryStrategy)
Defaults to CdcSourceP.DEFAULT_RECONNECT_BEHAVIOR
.
@Nonnull public MySqlCdcSources.Builder setShouldStateBeResetOnReconnect(boolean reset)
@Nonnull public MySqlCdcSources.Builder setCustomProperty(@Nonnull String key, @Nonnull String value)
@Nonnull public StreamSource<ChangeRecord> build()
Copyright © 2023 Hazelcast, Inc.. All rights reserved.