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_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
DEFAULT_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) |
DB2ConnectOptions(String uri) |
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 |
setPassword(String password)
Specify the user password to be used for the authentication.
|
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 |
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 |
setUser(String user)
Specify the user account to be used for the authentication.
|
JsonObject |
toJson()
Convert to JSON
|
getCachePreparedStatements, getDatabase, getHost, getPassword, getPort, getPreparedStatementCacheMaxSize, getPreparedStatementCacheSqlLimit, getProperties, getUser
addCrlPath, addCrlValue, addEnabledCipherSuite, addEnabledSecureTransportProtocol, getHostnameVerificationAlgorithm, getReconnectAttempts, getReconnectInterval, removeEnabledSecureTransportProtocol, setConnectTimeout, setEnabledSecureTransportProtocols, setHostnameVerificationAlgorithm, setIdleTimeout, setIdleTimeoutUnit, setJdkSslEngineOptions, setKeyCertOptions, setKeyStoreOptions, setLocalAddress, setLogActivity, setMetricsName, setOpenSslEngineOptions, setPemKeyCertOptions, setPemTrustOptions, setPfxKeyCertOptions, setPfxTrustOptions, setProxyOptions, setReceiveBufferSize, setReconnectAttempts, setReconnectInterval, setReuseAddress, setReusePort, setSendBufferSize, setSoLinger, setSsl, setSslEngineOptions, setSslHandshakeTimeout, setSslHandshakeTimeoutUnit, setTcpCork, setTcpFastOpen, setTcpKeepAlive, setTcpNoDelay, setTcpQuickAck, setTrafficClass, setTrustAll, setTrustOptions, setTrustStoreOptions, setUseAlpn, 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
getLogActivity, getReceiveBufferSize, getSendBufferSize, getTrafficClass, isReuseAddress, isReusePort
public 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(String uri)
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)
SqlConnectOptions
setHost
in class SqlConnectOptions
host
- the host to specifypublic DB2ConnectOptions setPort(int port)
SqlConnectOptions
setPort
in class SqlConnectOptions
port
- the port to specifypublic DB2ConnectOptions setUser(String user)
SqlConnectOptions
setUser
in class SqlConnectOptions
user
- the user to specifypublic DB2ConnectOptions setPassword(String password)
SqlConnectOptions
setPassword
in class SqlConnectOptions
password
- the password to specifypublic DB2ConnectOptions setDatabase(String database)
SqlConnectOptions
setDatabase
in class SqlConnectOptions
database
- the database name to specifypublic DB2ConnectOptions setCachePreparedStatements(boolean cachePreparedStatements)
SqlConnectOptions
setCachePreparedStatements
in class SqlConnectOptions
cachePreparedStatements
- true if cache should be enabledpublic DB2ConnectOptions setPreparedStatementCacheMaxSize(int preparedStatementCacheMaxSize)
SqlConnectOptions
setPreparedStatementCacheMaxSize
in class SqlConnectOptions
preparedStatementCacheMaxSize
- the size to setpublic DB2ConnectOptions setPreparedStatementCacheSqlLimit(int preparedStatementCacheSqlLimit)
SqlConnectOptions
setPreparedStatementCacheSqlLimit
in class SqlConnectOptions
preparedStatementCacheSqlLimit
- the maximum length limit of SQL string to setpublic int getPipeliningLimit()
@Deprecated public DB2ConnectOptions setPipeliningLimit(int pipeliningLimit)
pipeliningLimit
- the number of commands that can simultaneously use the
same physical socket connection.public DB2ConnectOptions setProperties(Map<String,String> properties)
SqlConnectOptions
setProperties
in class SqlConnectOptions
properties
- the value of properties to specifypublic DB2ConnectOptions addProperty(String key, String value)
SqlConnectOptions
addProperty
in class SqlConnectOptions
key
- the value of property keyvalue
- the value of property valueprotected void init()
init
in class SqlConnectOptions
public JsonObject toJson()
ClientOptionsBase
toJson
in class SqlConnectOptions
public boolean equals(Object o)
equals
in class NetClientOptions
public int hashCode()
hashCode
in class NetClientOptions
Copyright © 2020 Eclipse. All rights reserved.