public class MySQLConnectOptions
extends io.vertx.sqlclient.SqlConnectOptions
MySQLConnection or MySQLPool.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_COLLATION |
static Map<String,String> |
DEFAULT_CONNECTION_ATTRIBUTES |
static String |
DEFAULT_HOST |
static String |
DEFAULT_PASSWORD |
static int |
DEFAULT_PORT |
static String |
DEFAULT_SCHEMA |
static String |
DEFAULT_USER |
DEFAULT_CACHE_PREPARED_STATEMENTS, DEFAULT_PREPARED_STATEMENT_CACHE_MAX_SIZE, DEFAULT_PREPARED_STATEMENT_CACHE_SQL_LIMITDEFAULT_HOSTNAME_VERIFICATION_ALGORITHM, DEFAULT_RECONNECT_ATTEMPTS, DEFAULT_RECONNECT_INTERVALDEFAULT_CONNECT_TIMEOUT, DEFAULT_METRICS_NAME, DEFAULT_TRUST_ALLDEFAULT_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_BUFFERSDEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
MySQLConnectOptions() |
MySQLConnectOptions(JsonObject json) |
MySQLConnectOptions(MySQLConnectOptions other) |
| Modifier and Type | Method and Description |
|---|---|
MySQLConnectOptions |
addCrlPath(String crlPath)
Add a CRL path
|
MySQLConnectOptions |
addCrlValue(Buffer crlValue)
Add a CRL value
|
MySQLConnectOptions |
addEnabledCipherSuite(String suite)
Add an enabled cipher suite, appended to the ordered suites.
|
MySQLConnectOptions |
addEnabledSecureTransportProtocol(String protocol)
Add an enabled SSL/TLS protocols, appended to the ordered protocols.
|
MySQLConnectOptions |
addProperty(String key,
String value) |
static MySQLConnectOptions |
fromUri(String connectionUri)
Provide a
MySQLConnectOptions configured from a connection URI. |
String |
getCollation()
Get the collation for the connection.
|
protected void |
init()
Initialize with the default options.
|
MySQLConnectOptions |
removeEnabledSecureTransportProtocol(String protocol)
Removes an enabled SSL/TLS protocol from the ordered protocols.
|
MySQLConnectOptions |
setCachePreparedStatements(boolean cachePreparedStatements) |
MySQLConnectOptions |
setCollation(String collation)
Set the collation for the connection.
|
MySQLConnectOptions |
setConnectTimeout(int connectTimeout)
Set the connect timeout
|
MySQLConnectOptions |
setDatabase(String database) |
MySQLConnectOptions |
setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
Sets the list of enabled SSL/TLS protocols.
|
MySQLConnectOptions |
setHost(String host) |
MySQLConnectOptions |
setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
Set the hostname verification algorithm interval
To disable hostname verification, set hostnameVerificationAlgorithm to an empty String
|
MySQLConnectOptions |
setIdleTimeout(int idleTimeout)
Set the idle timeout, default time unit is seconds.
|
MySQLConnectOptions |
setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
Set the idle timeout unit.
|
MySQLConnectOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
MySQLConnectOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
MySQLConnectOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
MySQLConnectOptions |
setLocalAddress(String localAddress)
Set the local interface to bind for network connections.
|
MySQLConnectOptions |
setLogActivity(boolean logEnabled)
Set to true to enabled network activity logging: Netty's pipeline is configured for logging on Netty's logger.
|
MySQLConnectOptions |
setMetricsName(String metricsName)
Set the metrics name identifying the reported metrics, useful for grouping metrics
with the same name.
|
ClientOptionsBase |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
MySQLConnectOptions |
setPassword(String password) |
MySQLConnectOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
MySQLConnectOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
MySQLConnectOptions |
setPfxKeyCertOptions(PfxOptions options)
Set the key/cert options in pfx format.
|
MySQLConnectOptions |
setPfxTrustOptions(PfxOptions options)
Set the trust options in pfx format
|
MySQLConnectOptions |
setPort(int port) |
MySQLConnectOptions |
setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize) |
MySQLConnectOptions |
setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit) |
MySQLConnectOptions |
setProperties(Map<String,String> properties) |
MySQLConnectOptions |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for connections via CONNECT proxy (e.g.
|
MySQLConnectOptions |
setReceiveBufferSize(int receiveBufferSize)
Set the TCP receive buffer size
|
MySQLConnectOptions |
setReconnectAttempts(int attempts)
Set the value of reconnect attempts
|
MySQLConnectOptions |
setReconnectInterval(long interval)
Set the reconnect interval
|
MySQLConnectOptions |
setReuseAddress(boolean reuseAddress)
Set the value of reuse address
|
MySQLConnectOptions |
setReusePort(boolean reusePort)
Set the value of reuse port.
|
MySQLConnectOptions |
setSendBufferSize(int sendBufferSize)
Set the TCP send buffer size
|
MySQLConnectOptions |
setSoLinger(int soLinger)
Set whether SO_linger keep alive is enabled
|
MySQLConnectOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
MySQLConnectOptions |
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.
|
MySQLConnectOptions |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.
|
MySQLConnectOptions |
setTcpCork(boolean tcpCork)
Enable the
TCP_CORK option - only with linux native transport. |
MySQLConnectOptions |
setTcpFastOpen(boolean tcpFastOpen)
Enable the
TCP_FASTOPEN option - only with linux native transport. |
MySQLConnectOptions |
setTcpKeepAlive(boolean tcpKeepAlive)
Set whether TCP keep alive is enabled
|
MySQLConnectOptions |
setTcpNoDelay(boolean tcpNoDelay)
Set whether TCP no delay is enabled
|
MySQLConnectOptions |
setTcpQuickAck(boolean tcpQuickAck)
Enable the
TCP_QUICKACK option - only with linux native transport. |
MySQLConnectOptions |
setTrafficClass(int trafficClass)
Set the value of traffic class
|
MySQLConnectOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
MySQLConnectOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
MySQLConnectOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
MySQLConnectOptions |
setUseAlpn(boolean useAlpn)
Set the ALPN usage.
|
MySQLConnectOptions |
setUsePooledBuffers(boolean usePooledBuffers)
Set whether Netty pooled buffers are enabled
|
MySQLConnectOptions |
setUser(String user) |
JsonObject |
toJson()
Convert to JSON
|
checkParameterNonNull, getCachePreparedStatements, getDatabase, getHost, getPassword, getPort, getPreparedStatementCacheMaxSize, getPreparedStatementCacheSqlLimit, getProperties, getUserequals, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, hashCode, setSslgetConnectTimeout, getLocalAddress, getMetricsName, getProxyOptions, isTrustAllgetCrlPaths, 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, isUsePooledBuffersgetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic 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_COLLATION
public MySQLConnectOptions()
public MySQLConnectOptions(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 MySQLConnectOptions setHost(String host)
setHost in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setPort(int port)
setPort in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setUser(String user)
setUser in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setPassword(String password)
setPassword in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setDatabase(String database)
setDatabase in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setCachePreparedStatements(boolean cachePreparedStatements)
setCachePreparedStatements in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize)
setPreparedStatementCacheMaxSize in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit)
setPreparedStatementCacheSqlLimit in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setProperties(Map<String,String> properties)
setProperties in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions addProperty(String key, String value)
addProperty in class io.vertx.sqlclient.SqlConnectOptionspublic MySQLConnectOptions setSendBufferSize(int sendBufferSize)
NetworkOptionssetSendBufferSize in class NetClientOptionssendBufferSize - the buffers size, in bytespublic MySQLConnectOptions setReceiveBufferSize(int receiveBufferSize)
NetworkOptionssetReceiveBufferSize in class NetClientOptionsreceiveBufferSize - the buffers size, in bytespublic MySQLConnectOptions setReuseAddress(boolean reuseAddress)
NetworkOptionssetReuseAddress in class NetClientOptionsreuseAddress - the value of reuse addresspublic MySQLConnectOptions setReusePort(boolean reusePort)
NetworkOptionssetReusePort in class NetClientOptionsreusePort - the value of reuse portpublic MySQLConnectOptions setTrafficClass(int trafficClass)
NetworkOptionssetTrafficClass in class NetClientOptionstrafficClass - the value of traffic classpublic MySQLConnectOptions setTcpNoDelay(boolean tcpNoDelay)
TCPSSLOptionssetTcpNoDelay in class NetClientOptionstcpNoDelay - true if TCP no delay is enabled (Nagle disabled)public MySQLConnectOptions setTcpKeepAlive(boolean tcpKeepAlive)
TCPSSLOptionssetTcpKeepAlive in class NetClientOptionstcpKeepAlive - true if TCP keep alive is enabledpublic MySQLConnectOptions setSoLinger(int soLinger)
TCPSSLOptionssetSoLinger in class NetClientOptionssoLinger - true if SO_linger is enabledpublic MySQLConnectOptions setUsePooledBuffers(boolean usePooledBuffers)
TCPSSLOptionssetUsePooledBuffers in class NetClientOptionsusePooledBuffers - true if pooled buffers enabledpublic MySQLConnectOptions setIdleTimeout(int idleTimeout)
TCPSSLOptionsTCPSSLOptions.setIdleTimeoutUnit(TimeUnit)setIdleTimeout in class NetClientOptionsidleTimeout - the timeout, in secondspublic MySQLConnectOptions setIdleTimeoutUnit(TimeUnit idleTimeoutUnit)
TCPSSLOptionssetIdleTimeoutUnit in class NetClientOptionsidleTimeoutUnit - specify time unit.public MySQLConnectOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class NetClientOptionsoptions - the key store optionspublic MySQLConnectOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class NetClientOptionsoptions - the key store in jks formatpublic MySQLConnectOptions setPfxKeyCertOptions(PfxOptions options)
TCPSSLOptionssetPfxKeyCertOptions in class NetClientOptionsoptions - the key cert options in pfx formatpublic MySQLConnectOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class NetClientOptionsoptions - the options in pem formatpublic MySQLConnectOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class NetClientOptionsoptions - the trust optionspublic MySQLConnectOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class NetClientOptionsoptions - the trust options in jks formatpublic MySQLConnectOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class NetClientOptionsoptions - the trust options in pem formatpublic MySQLConnectOptions setPfxTrustOptions(PfxOptions options)
TCPSSLOptionssetPfxTrustOptions in class NetClientOptionsoptions - the trust options in pfx formatpublic MySQLConnectOptions addEnabledCipherSuite(String suite)
TCPSSLOptionsaddEnabledCipherSuite in class NetClientOptionssuite - the suitepublic MySQLConnectOptions addEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsaddEnabledSecureTransportProtocol in class NetClientOptionsprotocol - the SSL/TLS protocol to enablepublic MySQLConnectOptions removeEnabledSecureTransportProtocol(String protocol)
TCPSSLOptionsremoveEnabledSecureTransportProtocol in class NetClientOptionsprotocol - the SSL/TLS protocol to disablepublic MySQLConnectOptions setUseAlpn(boolean useAlpn)
TCPSSLOptionssetUseAlpn in class NetClientOptionsuseAlpn - true when Application-Layer Protocol Negotiation should be usedpublic MySQLConnectOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class NetClientOptionssslEngineOptions - the ssl engine to usepublic MySQLConnectOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class NetClientOptionspublic MySQLConnectOptions setTcpFastOpen(boolean tcpFastOpen)
TCPSSLOptionsTCP_FASTOPEN option - only with linux native transport.setTcpFastOpen in class NetClientOptionstcpFastOpen - the fast open valuepublic MySQLConnectOptions setTcpCork(boolean tcpCork)
TCPSSLOptionsTCP_CORK option - only with linux native transport.setTcpCork in class NetClientOptionstcpCork - the cork valuepublic MySQLConnectOptions setTcpQuickAck(boolean tcpQuickAck)
TCPSSLOptionsTCP_QUICKACK option - only with linux native transport.setTcpQuickAck in class NetClientOptionstcpQuickAck - the quick ack valuepublic ClientOptionsBase setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class NetClientOptionspublic MySQLConnectOptions addCrlPath(String crlPath) throws NullPointerException
TCPSSLOptionsaddCrlPath in class NetClientOptionscrlPath - the pathNullPointerExceptionpublic MySQLConnectOptions addCrlValue(Buffer crlValue) throws NullPointerException
TCPSSLOptionsaddCrlValue in class NetClientOptionscrlValue - the valueNullPointerExceptionpublic MySQLConnectOptions setTrustAll(boolean trustAll)
ClientOptionsBasesetTrustAll in class NetClientOptionstrustAll - true if all should be trustedpublic MySQLConnectOptions setConnectTimeout(int connectTimeout)
ClientOptionsBasesetConnectTimeout in class NetClientOptionsconnectTimeout - connect timeout, in mspublic MySQLConnectOptions setMetricsName(String metricsName)
ClientOptionsBasesetMetricsName in class NetClientOptionsmetricsName - the metrics namepublic MySQLConnectOptions setReconnectAttempts(int attempts)
NetClientOptionssetReconnectAttempts in class NetClientOptionsattempts - the maximum number of reconnect attemptspublic MySQLConnectOptions setReconnectInterval(long interval)
NetClientOptionssetReconnectInterval in class NetClientOptionsinterval - the reconnect interval in mspublic MySQLConnectOptions setHostnameVerificationAlgorithm(String hostnameVerificationAlgorithm)
NetClientOptionssetHostnameVerificationAlgorithm in class NetClientOptionshostnameVerificationAlgorithm - should be HTTPS, LDAPS or an empty Stringpublic MySQLConnectOptions setLogActivity(boolean logEnabled)
NetworkOptionssetLogActivity in class NetClientOptionslogEnabled - true for logging the network activitypublic MySQLConnectOptions setProxyOptions(ProxyOptions proxyOptions)
ClientOptionsBasesetProxyOptions in class NetClientOptionsproxyOptions - proxy options objectpublic MySQLConnectOptions setLocalAddress(String localAddress)
ClientOptionsBasesetLocalAddress in class NetClientOptionslocalAddress - the local addresspublic MySQLConnectOptions setEnabledSecureTransportProtocols(Set<String> enabledSecureTransportProtocols)
TCPSSLOptionssetEnabledSecureTransportProtocols in class NetClientOptionsenabledSecureTransportProtocols - the SSL/TLS protocols to enablepublic MySQLConnectOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptionssetSslHandshakeTimeout in class NetClientOptionssslHandshakeTimeout - the SSL handshake timeout to set, in millisecondspublic MySQLConnectOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptionssetSslHandshakeTimeoutUnit in class NetClientOptionssslHandshakeTimeoutUnit - specify time unit.protected void init()
init in class io.vertx.sqlclient.SqlConnectOptionspublic JsonObject toJson()
ClientOptionsBasetoJson in class io.vertx.sqlclient.SqlConnectOptionsCopyright © 2019 Eclipse. All rights reserved.