public final class MySqlConnectionFactoryProvider extends Object implements ConnectionFactoryProvider
ConnectionFactoryProvider for creating MySqlConnectionFactorys.| Modifier and Type | Field and Description |
|---|---|
static Option<Boolean> |
AUTODETECT_EXTENSIONS
Enable/Disable auto-detect driver extensions.
|
static String |
MYSQL_DRIVER
The name of the driver used for discovery, should not be changed.
|
static Option<Integer> |
PREPARE_CACHE_SIZE
Option to set the maximum size of the
Query parsing cache. |
static Option<Integer> |
QUERY_CACHE_SIZE
Option to set the maximum size of the server-preparing cache.
|
static Option<ZoneId> |
SERVER_ZONE_ID
Option to set
ZoneId of server. |
static Option<Duration> |
SOCKET_TIMEOUT
Deprecated.
This option has been deprecated as of version 0.9.2, because it has no effect and serves no purpose.
Please remove any references to this option from your code, as it will be removed in a future release.
|
static Option<String> |
SSL_CA
Option to set a PEM file of server SSL CA.
|
static Option<String> |
SSL_CERT
Option to set a PEM file of client SSL cert.
|
static Option<Function<io.netty.handler.ssl.SslContextBuilder,io.netty.handler.ssl.SslContextBuilder>> |
SSL_CONTEXT_BUILDER_CUSTOMIZER
Option to custom
SslContextBuilder. |
static Option<HostnameVerifier> |
SSL_HOSTNAME_VERIFIER
Option to configure
HostnameVerifier. |
static Option<String> |
SSL_KEY
Option to set a PEM file of client SSL key.
|
static Option<CharSequence> |
SSL_KEY_PASSWORD
Option to set a PEM file password of client SSL key.
|
static Option<SslMode> |
SSL_MODE
Option to
SslMode. |
static Option<Boolean> |
TCP_KEEP_ALIVE
Enable/Disable TCP KeepAlive.
|
static Option<Boolean> |
TCP_NO_DELAY
Enable/Disable TCP NoDelay.
|
static Option<String[]> |
TLS_VERSION
Option to TLS versions for SslContext protocols, see also
TlsVersions. |
static Option<String> |
UNIX_SOCKET
Option to set the Unix Domain Socket.
|
static Option<Object> |
USE_SERVER_PREPARE_STATEMENT
Enable server preparing for parametrized statements and prefer server preparing simple statements.
|
static Option<ZeroDateOption> |
ZERO_DATE
Option to configure handling when MySQL server returning "zero date" (aka.
|
| Constructor and Description |
|---|
MySqlConnectionFactoryProvider() |
| Modifier and Type | Method and Description |
|---|---|
ConnectionFactory |
create(ConnectionFactoryOptions options) |
String |
getDriver() |
boolean |
supports(ConnectionFactoryOptions options) |
public static final String MYSQL_DRIVER
public static final Option<String> UNIX_SOCKET
public static final Option<ZoneId> SERVER_ZONE_ID
ZoneId of server. If it is set, driver will ignore the real time zone of
server-side.public static final Option<ZeroDateOption> ZERO_DATE
public static final Option<HostnameVerifier> SSL_HOSTNAME_VERIFIER
HostnameVerifier. It is available only if the SSL_MODE set to
SslMode.VERIFY_IDENTITY. It can be an implementation class name of HostnameVerifier
with a public no-args constructor.public static final Option<String[]> TLS_VERSION
TlsVersions. Usually sorted from
higher to lower. It can be a Collection<String>. It can be a String, protocols will be
split by ,. e.g. "TLSv1.2,TLSv1.1,TLSv1".public static final Option<String> SSL_CA
SSL_MODE set to SslMode.VERIFY_CA or higher level.public static final Option<String> SSL_KEY
public static final Option<CharSequence> SSL_KEY_PASSWORD
SSL_KEY and
SSL_CERT set.public static final Option<String> SSL_CERT
public static final Option<Function<io.netty.handler.ssl.SslContextBuilder,io.netty.handler.ssl.SslContextBuilder>> SSL_CONTEXT_BUILDER_CUSTOMIZER
SslContextBuilder. It can be an implementation class name of Function
with a public no-args constructor.@Deprecated public static final Option<Duration> SOCKET_TIMEOUT
public static final Option<Boolean> TCP_KEEP_ALIVE
public static final Option<Boolean> TCP_NO_DELAY
public static final Option<Object> USE_SERVER_PREPARE_STATEMENT
The value can be a Boolean. If it is true, driver will use server preparing for
parametrized statements and text query for simple statements. If it is false, driver will use
client preparing for parametrized statements and text query for simple statements.
The value can be a Predicate<String>. If it is set, driver will server
preparing for parametrized statements, it configures whether to prefer prepare execution on a
statement-by-statement basis (simple statements). The Predicate<String>
accepts the simple SQL query string and returns a boolean flag indicating preference.
The value can be a String. If it is set, driver will try to convert it to Boolean or an
instance of Predicate<String> which use reflection with a public
no-args constructor.
public static final Option<Integer> PREPARE_CACHE_SIZE
Query parsing cache. Default to 256.public static final Option<Integer> QUERY_CACHE_SIZE
0.public ConnectionFactory create(ConnectionFactoryOptions options)
create in interface ConnectionFactoryProviderpublic boolean supports(ConnectionFactoryOptions options)
supports in interface ConnectionFactoryProviderpublic String getDriver()
getDriver in interface ConnectionFactoryProviderCopyright © 2018–2023 asyncer.io. All rights reserved.