public class DB2ConnectOptions extends SqlConnectOptions
DB2Connection or DB2Pool.| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CHARSET |
static Map<String,String> |
DEFAULT_CONNECTION_ATTRIBUTES |
static String |
DEFAULT_HOST |
static int |
DEFAULT_PIPELINING_LIMIT |
static int |
DEFAULT_PORT |
static boolean |
DEFAULT_USE_AFFECTED_ROWS |
DEFAULT_CACHE_PREPARED_STATEMENTS, DEFAULT_PREPARED_STATEMENT_CACHE_FILTER, 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_ALPNDEFAULT_LOG_ENABLED, DEFAULT_RECEIVE_BUFFER_SIZE, DEFAULT_REUSE_ADDRESS, DEFAULT_REUSE_PORT, DEFAULT_SEND_BUFFER_SIZE, DEFAULT_TRAFFIC_CLASS| Constructor and Description |
|---|
DB2ConnectOptions() |
DB2ConnectOptions(DB2ConnectOptions other) |
DB2ConnectOptions(JsonObject json) |
DB2ConnectOptions(SqlConnectOptions other) |
| Modifier and Type | Method and Description |
|---|---|
DB2ConnectOptions |
addProperty(String key,
String value)
Add a property for this client, which will be sent to server at the connection start.
|
boolean |
equals(Object o) |
static DB2ConnectOptions |
fromUri(String connectionUri)
Provide a
DB2ConnectOptions configured from a connection URI. |
int |
getPipeliningLimit() |
int |
hashCode() |
protected void |
init()
Initialize with the default options.
|
DB2ConnectOptions |
setCachePreparedStatements(boolean cachePreparedStatements)
Set whether prepared statements cache should be enabled.
|
DB2ConnectOptions |
setDatabase(String database)
Specify the default database for the connection.
|
DB2ConnectOptions |
setHost(String host)
Specify the host for connecting to the server.
|
DB2ConnectOptions |
setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions) |
DB2ConnectOptions |
setKeyCertOptions(KeyCertOptions options)
Set the key/cert options.
|
DB2ConnectOptions |
setKeyStoreOptions(JksOptions options)
Set the key/cert options in jks format, aka Java keystore.
|
DB2ConnectOptions |
setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions) |
DB2ConnectOptions |
setPassword(String password)
Specify the user password to be used for the authentication.
|
DB2ConnectOptions |
setPemKeyCertOptions(PemKeyCertOptions options)
Set the key/cert store options in pem format.
|
DB2ConnectOptions |
setPemTrustOptions(PemTrustOptions options)
Set the trust options in pem format
|
DB2ConnectOptions |
setPipeliningLimit(int pipeliningLimit)
Deprecated.
UNSTABLE FEATURE: Current default value is 1, anything higher
than 1 will result in errors currently.
|
DB2ConnectOptions |
setPort(int port)
Specify the port for connecting to the server.
|
DB2ConnectOptions |
setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize)
Set the maximum number of prepared statements that the connection will cache.
|
DB2ConnectOptions |
setPreparedStatementCacheSqlFilter(java.util.function.Predicate<String> predicate)
Set a predicate filtering prepared statements that the connection will cache.
|
DB2ConnectOptions |
setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit)
Set the maximum length of prepared statement SQL string that the connection will cache.
|
DB2ConnectOptions |
setProperties(Map<String,String> properties)
Set properties for this client, which will be sent to server at the connection start.
|
DB2ConnectOptions |
setSsl(boolean ssl)
Set whether SSL/TLS is enabled
|
DB2ConnectOptions |
setSslEngineOptions(SSLEngineOptions sslEngineOptions)
Set to use SSL engine implementation to use.
|
DB2ConnectOptions |
setSslHandshakeTimeout(long sslHandshakeTimeout)
Set the SSL handshake timeout, default time unit is seconds.
|
DB2ConnectOptions |
setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
Set the SSL handshake timeout unit.
|
DB2ConnectOptions |
setTracingPolicy(TracingPolicy tracingPolicy)
Set the tracing policy for the client behavior when Vert.x has tracing enabled.
|
DB2ConnectOptions |
setTrustAll(boolean trustAll)
Set whether all server certificates should be trusted
|
DB2ConnectOptions |
setTrustOptions(TrustOptions options)
Set the trust options.
|
DB2ConnectOptions |
setTrustStoreOptions(JksOptions options)
Set the trust options in jks format, aka Java truststore
|
DB2ConnectOptions |
setUser(String user)
Specify the user account to be used for the authentication.
|
JsonObject |
toJson()
Convert to JSON
|
getCachePreparedStatements, getDatabase, getHost, getPassword, getPort, getPreparedStatementCacheMaxSize, getPreparedStatementCacheSqlFilter, getProperties, getSocketAddress, getTracingPolicy, getUseraddCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, removeEnabledSecureTransportProtocol, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setLocalAddress, setLogActivity, setMetricsName, setPfxKeyCertOptions, setPfxTrustOptions, setProxyOptions, setReceiveBufferSize, setReconnectAttempts, setReconnectInterval, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setUseAlpngetConnectTimeout, 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, isUseAlpngetLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePortpublic static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String DEFAULT_CHARSET
public static final boolean DEFAULT_USE_AFFECTED_ROWS
public static final int DEFAULT_PIPELINING_LIMIT
public DB2ConnectOptions()
public DB2ConnectOptions(JsonObject json)
public DB2ConnectOptions(SqlConnectOptions other)
public DB2ConnectOptions(DB2ConnectOptions other)
public static DB2ConnectOptions fromUri(String connectionUri) throws IllegalArgumentException
DB2ConnectOptions configured from a connection URI.connectionUri - the connection URI to configure fromDB2ConnectOptions parsed from the connection URIIllegalArgumentException - when the connectionUri is in an
invalid formatpublic DB2ConnectOptions setHost(String host)
SqlConnectOptionssetHost in class SqlConnectOptionshost - the host to specifypublic DB2ConnectOptions setPort(int port)
SqlConnectOptionssetPort in class SqlConnectOptionsport - the port to specifypublic DB2ConnectOptions setUser(String user)
SqlConnectOptionssetUser in class SqlConnectOptionsuser - the user to specifypublic DB2ConnectOptions setPassword(String password)
SqlConnectOptionssetPassword in class SqlConnectOptionspassword - the password to specifypublic DB2ConnectOptions setDatabase(String database)
SqlConnectOptionssetDatabase in class SqlConnectOptionsdatabase - the database name to specifypublic DB2ConnectOptions setCachePreparedStatements(boolean cachePreparedStatements)
SqlConnectOptionssetCachePreparedStatements in class SqlConnectOptionscachePreparedStatements - true if cache should be enabledpublic DB2ConnectOptions setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize)
SqlConnectOptionssetPreparedStatementCacheMaxSize in class SqlConnectOptionspreparedStatementCacheMaxSize - the size to setpublic DB2ConnectOptions setPreparedStatementCacheSqlFilter(java.util.function.Predicate<String> predicate)
SqlConnectOptions The default predicate accepts predicate having query length < SqlConnectOptions.DEFAULT_PREPARED_STATEMENT_CACHE_SQL_LIMIT
setPreparedStatementCacheSqlFilter in class SqlConnectOptionspredicate - the filterpublic DB2ConnectOptions setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit)
SqlConnectOptions This is an helper setting the SqlConnectOptions.setPreparedStatementCacheSqlFilter(Predicate).
setPreparedStatementCacheSqlLimit in class SqlConnectOptionspreparedStatementCacheSqlLimit - the maximum length limit of SQL string to setpublic DB2ConnectOptions setSsl(boolean ssl)
TCPSSLOptionssetSsl in class NetClientOptionsssl - true if enabledpublic DB2ConnectOptions setSslHandshakeTimeout(long sslHandshakeTimeout)
TCPSSLOptionssetSslHandshakeTimeout in class NetClientOptionssslHandshakeTimeout - the SSL handshake timeout to set, in millisecondspublic DB2ConnectOptions setSslHandshakeTimeoutUnit(TimeUnit sslHandshakeTimeoutUnit)
TCPSSLOptionssetSslHandshakeTimeoutUnit in class NetClientOptionssslHandshakeTimeoutUnit - specify time unit.public DB2ConnectOptions setSslEngineOptions(SSLEngineOptions sslEngineOptions)
TCPSSLOptionssetSslEngineOptions in class NetClientOptionssslEngineOptions - the ssl engine to usepublic DB2ConnectOptions setJdkSslEngineOptions(JdkSSLEngineOptions sslEngineOptions)
setJdkSslEngineOptions in class NetClientOptionspublic DB2ConnectOptions setKeyCertOptions(KeyCertOptions options)
TCPSSLOptionssetKeyCertOptions in class NetClientOptionsoptions - the key store optionspublic DB2ConnectOptions setKeyStoreOptions(JksOptions options)
TCPSSLOptionssetKeyStoreOptions in class NetClientOptionsoptions - the key store in jks formatpublic DB2ConnectOptions setOpenSslEngineOptions(OpenSSLEngineOptions sslEngineOptions)
setOpenSslEngineOptions in class NetClientOptionspublic DB2ConnectOptions setPemKeyCertOptions(PemKeyCertOptions options)
TCPSSLOptionssetPemKeyCertOptions in class NetClientOptionsoptions - the options in pem formatpublic DB2ConnectOptions setPemTrustOptions(PemTrustOptions options)
TCPSSLOptionssetPemTrustOptions in class NetClientOptionsoptions - the trust options in pem formatpublic DB2ConnectOptions setTrustAll(boolean trustAll)
ClientOptionsBasesetTrustAll in class NetClientOptionstrustAll - true if all should be trustedpublic DB2ConnectOptions setTrustOptions(TrustOptions options)
TCPSSLOptionssetTrustOptions in class NetClientOptionsoptions - the trust optionspublic DB2ConnectOptions setTrustStoreOptions(JksOptions options)
TCPSSLOptionssetTrustStoreOptions in class NetClientOptionsoptions - the trust options in jks formatpublic int getPipeliningLimit()
@Deprecated public DB2ConnectOptions setPipeliningLimit(int pipeliningLimit)
pipeliningLimit - the number of commands that can simultaneously use the
same physical socket connection.public DB2ConnectOptions setTracingPolicy(TracingPolicy tracingPolicy)
SqlConnectOptionssetTracingPolicy in class SqlConnectOptionstracingPolicy - the tracing policypublic DB2ConnectOptions setProperties(Map<String,String> properties)
SqlConnectOptionssetProperties in class SqlConnectOptionsproperties - the value of properties to specifypublic DB2ConnectOptions addProperty(String key, String value)
SqlConnectOptionsaddProperty in class SqlConnectOptionskey - the value of property keyvalue - the value of property valueprotected void init()
init in class SqlConnectOptionspublic JsonObject toJson()
ClientOptionsBasetoJson in class SqlConnectOptionsCopyright © 2021 Eclipse. All rights reserved.