public class MySQLConnectOptions extends SqlConnectOptions
MySQLConnection
or MySQLPool
.Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CHARACTER_ENCODING |
static String |
DEFAULT_CHARSET |
static Map<String,String> |
DEFAULT_CONNECTION_ATTRIBUTES |
static String |
DEFAULT_HOST |
static String |
DEFAULT_PASSWORD |
static int |
DEFAULT_PORT |
static String |
DEFAULT_SCHEMA |
static SslMode |
DEFAULT_SSL_MODE |
static boolean |
DEFAULT_USE_AFFECTED_ROWS |
static String |
DEFAULT_USER |
DEFAULT_CACHE_PREPARED_STATEMENTS, DEFAULT_PREPARED_STATEMENT_CACHE_MAX_SIZE, DEFAULT_PREPARED_STATEMENT_CACHE_SQL_LIMIT
DEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVAL
DEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALL
DEFAULT_ENABLED_SECURE_TRANSPORT_PROTOCOLS, DEFAULT_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT_TIME_UNIT, DEFAULT_SO_LINGER, DEFAULT_SSL, DEFAULT_SSL_ENGINE, DEFAULT_SSL_HANDSHAKE_TIMEOUT, DEFAULT_SSL_HANDSHAKE_TIMEOUT_TIME_UNIT, DEFAULT_TCP_CORK, DEFAULT_TCP_FAST_OPEN, DEFAULT_TCP_KEEP_ALIVE, DEFAULT_TCP_NO_DELAY, DEFAULT_TCP_QUICKACK, DEFAULT_USE_ALPN, DEFAULT_USE_POOLED_BUFFERS
Constructor and Description |
---|
MySQLConnectOptions() |
MySQLConnectOptions(io.vertx.core.json.JsonObject json) |
MySQLConnectOptions(MySQLConnectOptions other) |
Modifier and Type | Method and Description |
---|---|
MySQLConnectOptions |
addCrlPath(String crlPath) |
MySQLConnectOptions |
addCrlValue(io.vertx.core.buffer.Buffer crlValue) |
MySQLConnectOptions |
addEnabledCipherSuite(String suite) |
MySQLConnectOptions |
addEnabledSecureTransportProtocol(String protocol) |
MySQLConnectOptions |
addProperty(String key,
String value) |
static MySQLConnectOptions |
fromUri(String connectionUri)
Provide a
MySQLConnectOptions configured from a connection URI. |
String |
getCharacterEncoding()
Get the Java charset for encoding string values.
|
String |
getCharset()
Get the charset for the connection.
|
String |
getCollation()
Get the collation for the connection.
|
String |
getServerRsaPublicKeyPath()
Get the path of the server RSA public key.
|
io.vertx.core.buffer.Buffer |
getServerRsaPublicKeyValue()
Get the value of the server RSA public key.
|
SslMode |
getSslMode()
Get the value of the configured SSL mode.
|
protected void |
init()
Initialize with the default options.
|
boolean |
isUseAffectedRows()
Get how affected rows are calculated on update/delete/insert.
|
MySQLConnectOptions |
removeEnabledSecureTransportProtocol(String protocol) |
MySQLConnectOptions |
setCachePreparedStatements(boolean cachePreparedStatements) |
MySQLConnectOptions |
setCharacterEncoding(String characterEncoding)
Set the Java charset for encoding string values, this value is UTF-8 by default.
|
MySQLConnectOptions |
setCharset(String charset)
Set the charset for the connection.
|
MySQLConnectOptions |
setCollation(String collation)
Set the collation for the connection.
|
MySQLConnectOptions |
setConnectTimeout(int connectTimeout) |
MySQLConnectOptions |
setDatabase(String database) |
MySQLConnectOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols) |
MySQLConnectOptions |
setHost(String host) |
MySQLConnectOptions |
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm) |
MySQLConnectOptions |
setIdleTimeout(int idleTimeout) |
MySQLConnectOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit) |
MySQLConnectOptions |
setJdkSslEngineOptions(io.vertx.core.net.JdkSSLEngineOptions sslEngineOptions) |
MySQLConnectOptions |
setKeyCertOptions(io.vertx.core.net.KeyCertOptions options) |
MySQLConnectOptions |
setKeyStoreOptions(io.vertx.core.net.JksOptions options) |
MySQLConnectOptions |
setLocalAddress(String localAddress) |
MySQLConnectOptions |
setLogActivity(boolean logEnabled) |
MySQLConnectOptions |
setMetricsName(String metricsName) |
io.vertx.core.net.ClientOptionsBase |
setOpenSslEngineOptions(io.vertx.core.net.OpenSSLEngineOptions sslEngineOptions) |
MySQLConnectOptions |
setPassword(String password) |
MySQLConnectOptions |
setPemKeyCertOptions(io.vertx.core.net.PemKeyCertOptions options) |
MySQLConnectOptions |
setPemTrustOptions(io.vertx.core.net.PemTrustOptions options) |
MySQLConnectOptions |
setPfxKeyCertOptions(io.vertx.core.net.PfxOptions options) |
MySQLConnectOptions |
setPfxTrustOptions(io.vertx.core.net.PfxOptions options) |
MySQLConnectOptions |
setPort(int port) |
MySQLConnectOptions |
setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize) |
MySQLConnectOptions |
setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit) |
MySQLConnectOptions |
setProperties(Map<String,String> properties) |
MySQLConnectOptions |
setProxyOptions(io.vertx.core.net.ProxyOptions proxyOptions) |
MySQLConnectOptions |
setReceiveBufferSize(int receiveBufferSize) |
MySQLConnectOptions |
setReconnectAttempts(int attempts) |
MySQLConnectOptions |
setReconnectInterval(long interval) |
MySQLConnectOptions |
setReuseAddress(boolean reuseAddress) |
MySQLConnectOptions |
setReusePort(boolean reusePort) |
MySQLConnectOptions |
setSendBufferSize(int sendBufferSize) |
MySQLConnectOptions |
setServerRsaPublicKeyPath(String serverRsaPublicKeyPath)
Set the path of server RSA public key which is mostly used for encrypting password under insecure connections when performing authentication.
|
MySQLConnectOptions |
setServerRsaPublicKeyValue(io.vertx.core.buffer.Buffer serverRsaPublicKeyValue)
Set the value of server RSA public key which is mostly used for encrypting password under insecure connections when performing authentication.
|
MySQLConnectOptions |
setSoLinger(int soLinger) |
MySQLConnectOptions |
setSsl(boolean ssl) |
MySQLConnectOptions |
setSslEngineOptions(io.vertx.core.net.SSLEngineOptions sslEngineOptions) |
MySQLConnectOptions |
setSslHandshakeTimeout(long sslHandshakeTimeout) |
MySQLConnectOptions |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit) |
MySQLConnectOptions |
setSslMode(SslMode sslMode)
Set the
SslMode for the client, this option can be used to specify the desired security state of the connection to the server. |
MySQLConnectOptions |
setTcpCork(boolean tcpCork) |
MySQLConnectOptions |
setTcpFastOpen(boolean tcpFastOpen) |
MySQLConnectOptions |
setTcpKeepAlive(boolean tcpKeepAlive) |
MySQLConnectOptions |
setTcpNoDelay(boolean tcpNoDelay) |
MySQLConnectOptions |
setTcpQuickAck(boolean tcpQuickAck) |
MySQLConnectOptions |
setTrafficClass(int trafficClass) |
MySQLConnectOptions |
setTrustAll(boolean trustAll) |
MySQLConnectOptions |
setTrustOptions(io.vertx.core.net.TrustOptions options) |
MySQLConnectOptions |
setTrustStoreOptions(io.vertx.core.net.JksOptions options) |
MySQLConnectOptions |
setUseAffectedRows(boolean useAffectedRows)
Sets how affected rows are calculated on update/delete/insert, if set to
true an update that effectively
does not change any data returns zero affected rows. |
MySQLConnectOptions |
setUseAlpn(boolean useAlpn) |
MySQLConnectOptions |
setUser(String user) |
io.vertx.core.json.JsonObject |
toJson() |
getCachePreparedStatements, getDatabase, getHost, getPassword, getPort, getPreparedStatementCacheMaxSize, getPreparedStatementCacheSqlLimit, getProperties, getUser
equals, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, hashCode, setUsePooledBuffers
getConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAll
getCrlPaths, getCrlValues, getEnabledCipherSuites, getEnabledSecureTransportProtocols, getIdleTimeout, getIdleTimeoutUnit, getJdkSslEngineOptions, getKeyCertOptions, getKeyStoreOptions, getOpenSslEngineOptions, getPemKeyCertOptions, getPemTrustOptions, getPfxKeyCertOptions, getPfxTrustOptions, getSoLinger, getSslEngineOptions, getSslHandshakeTimeout, getSslHandshakeTimeoutUnit, getTrustOptions, getTrustStoreOptions, isSsl, isTcpCork, isTcpFastOpen, isTcpKeepAlive, isTcpNoDelay, isTcpQuickAck, isUseAlpn, isUsePooledBuffers
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String DEFAULT_USER
public static final String DEFAULT_PASSWORD
public static final String DEFAULT_SCHEMA
public static final String DEFAULT_CHARSET
public static final boolean DEFAULT_USE_AFFECTED_ROWS
public static final SslMode DEFAULT_SSL_MODE
public static final String DEFAULT_CHARACTER_ENCODING
public MySQLConnectOptions()
public MySQLConnectOptions(io.vertx.core.json.JsonObject json)
public MySQLConnectOptions(MySQLConnectOptions other)
public static MySQLConnectOptions fromUri(String connectionUri) throws IllegalArgumentException
MySQLConnectOptions
configured from a connection URI.connectionUri
- the connection URI to configure fromMySQLConnectOptions
parsed from the connection URIIllegalArgumentException
- when the connectionUri
is in an invalid formatpublic String getCollation()
public MySQLConnectOptions setCollation(String collation)
collation
- the collation to setpublic String getCharset()
public MySQLConnectOptions setCharset(String charset)
charset
- the charset to setpublic String getCharacterEncoding()
public MySQLConnectOptions setCharacterEncoding(String characterEncoding)
characterEncoding
- the Java charset to configurepublic boolean isUseAffectedRows()
public MySQLConnectOptions setUseAffectedRows(boolean useAffectedRows)
true
an update that effectively
does not change any data returns zero affected rows.
See mysql-affected-rows for details.useAffectedRows
- whether only affected rows are countpublic SslMode getSslMode()
public MySQLConnectOptions setSslMode(SslMode sslMode)
SslMode
for the client, this option can be used to specify the desired security state of the connection to the server.sslMode
- the ssl-mode to specifypublic MySQLConnectOptions setSsl(boolean ssl)
setSsl
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setServerRsaPublicKeyPath(String serverRsaPublicKeyPath)
serverRsaPublicKeyPath
- the path of the server RSA public keypublic String getServerRsaPublicKeyPath()
public MySQLConnectOptions setServerRsaPublicKeyValue(io.vertx.core.buffer.Buffer serverRsaPublicKeyValue)
serverRsaPublicKeyValue
- the value of the server RSA public keypublic io.vertx.core.buffer.Buffer getServerRsaPublicKeyValue()
public MySQLConnectOptions setHost(String host)
setHost
in class SqlConnectOptions
public MySQLConnectOptions setPort(int port)
setPort
in class SqlConnectOptions
public MySQLConnectOptions setUser(String user)
setUser
in class SqlConnectOptions
public MySQLConnectOptions setPassword(String password)
setPassword
in class SqlConnectOptions
public MySQLConnectOptions setDatabase(String database)
setDatabase
in class SqlConnectOptions
public MySQLConnectOptions setCachePreparedStatements(boolean cachePreparedStatements)
setCachePreparedStatements
in class SqlConnectOptions
public MySQLConnectOptions setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize)
setPreparedStatementCacheMaxSize
in class SqlConnectOptions
public MySQLConnectOptions setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit)
setPreparedStatementCacheSqlLimit
in class SqlConnectOptions
public MySQLConnectOptions setProperties(Map<String,String> properties)
setProperties
in class SqlConnectOptions
public MySQLConnectOptions addProperty(String key, String value)
addProperty
in class SqlConnectOptions
public MySQLConnectOptions setSendBufferSize(int sendBufferSize)
setSendBufferSize
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setReceiveBufferSize(int receiveBufferSize)
setReceiveBufferSize
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setReuseAddress(boolean reuseAddress)
setReuseAddress
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setReusePort(boolean reusePort)
setReusePort
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTrafficClass(int trafficClass)
setTrafficClass
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTcpNoDelay(boolean tcpNoDelay)
setTcpNoDelay
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTcpKeepAlive(boolean tcpKeepAlive)
setTcpKeepAlive
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setSoLinger(int soLinger)
setSoLinger
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setIdleTimeout(int idleTimeout)
setIdleTimeout
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
setIdleTimeoutUnit
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setKeyCertOptions(io.vertx.core.net.KeyCertOptions options)
setKeyCertOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setKeyStoreOptions(io.vertx.core.net.JksOptions options)
setKeyStoreOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setPfxKeyCertOptions(io.vertx.core.net.PfxOptions options)
setPfxKeyCertOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setPemKeyCertOptions(io.vertx.core.net.PemKeyCertOptions options)
setPemKeyCertOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTrustOptions(io.vertx.core.net.TrustOptions options)
setTrustOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTrustStoreOptions(io.vertx.core.net.JksOptions options)
setTrustStoreOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setPemTrustOptions(io.vertx.core.net.PemTrustOptions options)
setPemTrustOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setPfxTrustOptions(io.vertx.core.net.PfxOptions options)
setPfxTrustOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions addEnabledCipherSuite(String suite)
addEnabledCipherSuite
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions addEnabledSecureTransportProtocol(String protocol)
addEnabledSecureTransportProtocol
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions removeEnabledSecureTransportProtocol(String protocol)
removeEnabledSecureTransportProtocol
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setUseAlpn(boolean useAlpn)
setUseAlpn
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setSslEngineOptions(io.vertx.core.net.SSLEngineOptions sslEngineOptions)
setSslEngineOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setJdkSslEngineOptions(io.vertx.core.net.JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTcpFastOpen(boolean tcpFastOpen)
setTcpFastOpen
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTcpCork(boolean tcpCork)
setTcpCork
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setTcpQuickAck(boolean tcpQuickAck)
setTcpQuickAck
in class io.vertx.core.net.NetClientOptions
public io.vertx.core.net.ClientOptionsBase setOpenSslEngineOptions(io.vertx.core.net.OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions addCrlPath(String crlPath) throws NullPointerException
addCrlPath
in class io.vertx.core.net.NetClientOptions
NullPointerException
public MySQLConnectOptions addCrlValue(io.vertx.core.buffer.Buffer crlValue) throws NullPointerException
addCrlValue
in class io.vertx.core.net.NetClientOptions
NullPointerException
public MySQLConnectOptions setTrustAll(boolean trustAll)
setTrustAll
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setConnectTimeout(int connectTimeout)
setConnectTimeout
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setMetricsName(String metricsName)
setMetricsName
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setReconnectAttempts(int attempts)
setReconnectAttempts
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setReconnectInterval(long interval)
setReconnectInterval
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
setHostnameVerificationAlgorithm
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setLogActivity(boolean logEnabled)
setLogActivity
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setProxyOptions(io.vertx.core.net.ProxyOptions proxyOptions)
setProxyOptions
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setLocalAddress(String localAddress)
setLocalAddress
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
setEnabledSecureTransportProtocols
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
setSslHandshakeTimeout
in class io.vertx.core.net.NetClientOptions
public MySQLConnectOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
setSslHandshakeTimeoutUnit
in class io.vertx.core.net.NetClientOptions
protected void init()
init
in class SqlConnectOptions
public io.vertx.core.json.JsonObject toJson()
toJson
in class SqlConnectOptions
Copyright © 2020 Eclipse. All rights reserved.