Package org.mariadb.jdbc
Class Configuration.Builder
java.lang.Object
org.mariadb.jdbc.Configuration.Builder
- All Implemented Interfaces:
Cloneable
- Enclosing class:
Configuration
A builder for
Configuration
instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<HostAddress> private HaMode
private Properties
private Boolean
private Boolean
private Boolean
private Boolean
private Boolean
private Boolean
private String
private String
private Integer
private Boolean
private String
private String
private Integer
private Boolean
private Boolean
private String
private String
private Boolean
private Boolean
private Boolean
private String
private String
private Boolean
private Boolean
private String
private Boolean
private String
private String
private String
private String
private String
private String
private Integer
private Integer
private Integer
private Integer
private Integer
private Boolean
private String
private Boolean
private Boolean
private String
private Boolean
private String
private Integer
private Integer
private Boolean
private Boolean
private String
private Integer
private Boolean
private String
private String
private String
private String
private String
private Integer
private String
private Boolean
private Boolean
private Integer
private Integer
private Integer
private String
private Boolean
private String
private String
private Boolean
private Integer
private Boolean
private String
private Boolean
private Boolean
private Boolean
private String
private Boolean
private Boolean
private Boolean
private String
private Boolean
private Boolean
private Boolean
private Boolean
private Boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd Host to possible addresses to connectAdd Host to possible addresses to connectAdd Host to possible addresses to connectAdd Host to possible addresses to connectaddLocalSocketHost
(String localSocket) Add a unix socket hostaddPipeHost
(String pipe) Add a windows pipe hostaddresses
(List<HostAddress> hostAddress) add host addressesaddresses
(HostAddress... hostAddress) add host addressesallowLocalInfile
(Boolean allowLocalInfile) Indicate if LOAD DATA LOCAL INFILE are permitted.allowMultiQueries
(Boolean allowMultiQueries) Indicate that multi-queries are allowed.allowPublicKeyRetrieval
(Boolean allowPublicKeyRetrieval) Allow RSA server file retrieval from MySQL serverautocommit
(Boolean autocommit) Permit to force autocommit connection valueblankTableNameMeta
(Boolean blankTableNameMeta) Set blank table name for metadata (old oracle compatibility)build()
Build a configurationcachePrepStmts
(Boolean cachePrepStmts) Cache server prepare resultconnectionAttributes
(String connectionAttributes) Additional connection attributes to identify connectionconnectionTimeZone
(String connectionTimeZone) indicate what timestamp timezone to use in exchanges with server possible value are LOCAL|SERVER|user-defined time zoneconnectTimeout
(Integer connectTimeout) Indicate connect timeout value, in milliseconds, or zero for no timeout.createDatabaseIfNotExist
(Boolean createDatabaseIfNotExist) Create database if not exist.credentialType
(String credentialType) set credential plugin typeSet default databasedefaultFetchSize
(Integer defaultFetchSize) Set default fetch sizedisablePipeline
(Boolean disablePipeline) Disable pipelinedumpQueriesOnException
(Boolean dumpQueriesOnException) Must queries be dump on exception stracktrace.enabledSslCipherSuites
(String enabledSslCipherSuites) set possible cipher list (comma separated), not using default java cipher listenabledSslProtocolSuites
(String enabledSslProtocolSuites) Set ssl protocol list to user (comma separated)fallbackToSystemKeyStore
(Boolean fallbackToSystemKeyStore) Indicate if keystore system properties can be used.fallbackToSystemTrustStore
(Boolean fallbackToSystemTrustStore) Indicate if system default truststore can be used.forceConnectionTimeZoneToSession
(Boolean forceConnectionTimeZoneToSession) Indicate if connectionTimeZone must be forced to sessiongaleraAllowedState
(String galeraAllowedState) Indicate galera allowed state (comma separated), permitting to validate if galera node is synchronizedgeometryDefaultType
(String geometryDefault) Indicate what default Object type Geometry a resultset.getObject must return.Set failover High-availability modeincludeInnodbStatusInDeadlockExceptions
(Boolean includeInnodbStatusInDeadlockExceptions) On dead-lock exception must add innodb status in exception error message.includeThreadDumpInDeadlockExceptions
(Boolean includeThreadDumpInDeadlockExceptions) Dead-lock error will contain threads informationpermit to execute an SQL command on connection creationjdbcCompliantTruncation
(Boolean jdbcCompliantTruncation) indicate if connector must force sql_mode strict mode for jdbc compliancekeyPassword
(String keyPassword) Client keystore alias passwordFile path of the keyStore file that contain client private key store and associate certificates (similar to java System property \"javax.net.ssl.keyStore\", but ensure that only the private key's entries are used)keyStorePassword
(String keyStorePassword) Client keystore passwordkeyStoreType
(String keyStoreType) Key store typelocalSocket
(String localSocket) Indicate to use Unix domain socket, if the server allows it, specifying named pipe name to connect The value is the path of Unix domain socket (available with "select @@socket" command).localSocketAddress
(String localSocketAddress) Indicate Hostname or IP address to bind the connection socket to a local (UNIX domain) socket.maxAllowedPacket
(Integer maxAllowedPacket) Indicate to driver server max_allowed_packet.maxIdleTime
(Integer maxIdleTime) Set the maximum idle time of a connection indicating that connection must be releasedmaxPoolSize
(Integer maxPoolSize) Set the limit number of connection in pool.maxQuerySizeToLog
(Integer maxQuerySizeToLog) Set the log size limit for queryminPoolSize
(Integer minPoolSize) Minimum pool size.nullDatabaseMeansCurrent
(Boolean nullDatabaseMeansCurrent) Permit indicating in DatabaseMetadata if null value must be considered current schema/catalogUser passwordpermitRedirect
(Boolean permitRedirect) indicate if connector must redirect connection when receiving server redirect informationpinGlobalTxToPhysicalConnection
(Boolean pinGlobalTxToPhysicalConnection) Indicate if for XA transaction, connector must reuse same connection.Indicate to use windows named pipe, specify named pipe name to connectCreate pool if not existing, or get a connection for the pool associate with this connection string if existing.set pool namepoolValidMinDelay
(Integer poolValidMinDelay) Pool will validate connection before giving it.prepStmtCacheSize
(Integer prepStmtCacheSize) If using server prepared statement, set LRU prepare cache sizepreserveInstants
(Boolean preserveInstants) Indicate if connection must preserve instantsregisterJmxPool
(Boolean registerJmxPool) Must pool register JMX informationrestrictedAuth
(String restrictedAuth) restrict authentication method to secure list.retriesAllDown
(Integer retriesAllDown) When failover occurs, how many connection attempt before throwing error when reconnectingreturnMultiValuesGeneratedIds
(Boolean returnMultiValuesGeneratedIds) indicate if connector must return multi-generated ids.serverRsaPublicKeyFile
(String serverRsaPublicKeyFile) MySQL Authentication RSA server file, for mysql authenticationserverSslCert
(String serverSslCert) Server SSL certificate (path or file content)servicePrincipalName
(String servicePrincipalName) set service principal name (GSSAPI)sessionVariables
(String sessionVariables) set connection session variables (comma separated)socketFactory
(String socketFactory) Socket factorysocketTimeout
(Integer socketTimeout) Indicate the network socket timeout (SO_TIMEOUT) in milliseconds.Set ssl modeltcpAbortiveClose
(Boolean tcpAbortiveClose) Indicate that when connection fails, to send an RST TCP packet.tcpKeepAlive
(Boolean tcpKeepAlive) Indicate if TCP keep-alive must be enabled.tcpKeepCount
(Integer tcpKeepCount) Indicate TCP keep-count value (for java 11+ only).tcpKeepIdle
(Integer tcpKeepIdle) Indicate TCP keep-idle value (for java 11+ only).tcpKeepInterval
(Integer tcpKeepInterval) Indicate TCP keep-interval value (for java 11+ only).Force timezone to use this timezone, not default java onetinyInt1isBit
(Boolean tinyInt1isBit) TinyInt(1) to be considered as bittlsSocketType
(String tlsSocketType) Permit to defined default tls plugin typetransactionIsolation
(String transactionIsolation) force default transaction isolation, not using server defaulttransactionReplay
(Boolean transactionReplay) Must cache commands in transaction and replay transaction on failover.transactionReplaySize
(Integer transactionReplaySize) Transaction replay cache sizetransformedBitIsBoolean
(Boolean transformedBitIsBoolean) TinyInt(1) to be considered as booleantrustStoreType
(String trustStoreType) trust store typeuseAffectedRows
(Boolean useAffectedRows) Indicate server to return affected rows in place of found rows.useBulkStmts
(Boolean useBulkStmts) Use server dedicated bulk batch commanduseBulkStmtsForInserts
(Boolean useBulkStmtsForInserts) Use server dedicated bulk batch command for insert (if useBulkStmts is enabled, useBulkStmtsForInserts will be enabled as well)useCatalogTerm
(String useCatalogTerm) "schema" and "database" are server synonymous.useCompression
(Boolean useCompression) Indicate to compress exchanges with the database through gzip.useLocalSessionState
(Boolean useLocalSessionState) indicate if connector can use local state to avoid unnecessary queries.useMysqlMetadata
(Boolean useMysqlMetadata) Permit indicating to force DatabaseMetadata.getDatabaseProductName() to return `MySQL` as database type, not real database typeset user to authenticate to serveruseReadAheadInput
(Boolean useReadAheadInput) Cache all socket available information.useResetConnection
(Boolean useResetConnection) Indicate that connection returned to pool must be RESETed like having proper connection state.useServerPrepStmts
(Boolean useServerPrepStmts) Indicate to use Client or Server prepared statementuuidAsString
(Boolean uuidAsString) Indicate if UUID fields must returns as StringyearIsDateType
(Boolean yearIsDateType) Year datatype to be considered as date
-
Field Details
-
_nonMappedOptions
-
_haMode
-
_addresses
-
user
-
password
-
database
-
timezone
-
connectionTimeZone
-
forceConnectionTimeZoneToSession
-
preserveInstants
-
autocommit
-
useMysqlMetadata
-
nullDatabaseMeansCurrent
-
useCatalogTerm
-
createDatabaseIfNotExist
-
useLocalSessionState
-
returnMultiValuesGeneratedIds
-
jdbcCompliantTruncation
-
permitRedirect
-
pinGlobalTxToPhysicalConnection
-
defaultFetchSize
-
maxQuerySizeToLog
-
maxAllowedPacket
-
geometryDefaultType
-
restrictedAuth
-
initSql
-
transactionIsolation
-
socketFactory
-
connectTimeout
-
pipe
-
localSocket
-
tcpKeepAlive
-
uuidAsString
-
tcpKeepIdle
-
tcpKeepCount
-
tcpKeepInterval
-
tcpAbortiveClose
-
localSocketAddress
-
socketTimeout
-
useReadAheadInput
-
tlsSocketType
-
sslMode
-
serverSslCert
-
keyStore
-
keyStorePassword
-
keyPassword
-
keyStoreType
-
trustStoreType
-
enabledSslCipherSuites
-
enabledSslProtocolSuites
-
fallbackToSystemKeyStore
-
fallbackToSystemTrustStore
-
allowMultiQueries
-
allowLocalInfile
-
useCompression
-
useAffectedRows
-
useBulkStmts
-
useBulkStmtsForInserts
-
disablePipeline
-
cachePrepStmts
-
prepStmtCacheSize
-
useServerPrepStmts
-
credentialType
-
sessionVariables
-
connectionAttributes
-
servicePrincipalName
-
blankTableNameMeta
-
tinyInt1isBit
-
transformedBitIsBoolean
-
yearIsDateType
-
dumpQueriesOnException
-
includeInnodbStatusInDeadlockExceptions
-
includeThreadDumpInDeadlockExceptions
-
retriesAllDown
-
galeraAllowedState
-
transactionReplay
-
transactionReplaySize
-
pool
-
poolName
-
maxPoolSize
-
minPoolSize
-
maxIdleTime
-
registerJmxPool
-
poolValidMinDelay
-
useResetConnection
-
serverRsaPublicKeyFile
-
allowPublicKeyRetrieval
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
user
set user to authenticate to server- Parameters:
user
- user- Returns:
- this
Configuration.Builder
-
serverSslCert
Server SSL certificate (path or file content)- Parameters:
serverSslCert
- set Server SSL certificate (path or file content)- Returns:
- this
Configuration.Builder
-
keyStore
File path of the keyStore file that contain client private key store and associate certificates (similar to java System property \"javax.net.ssl.keyStore\", but ensure that only the private key's entries are used)- Parameters:
keyStore
- client store certificates- Returns:
- this
Configuration.Builder
-
keyStorePassword
Client keystore password- Parameters:
keyStorePassword
- client store password- Returns:
- this
Configuration.Builder
-
keyPassword
Client keystore alias password- Parameters:
keyPassword
- client store alias password- Returns:
- this
Configuration.Builder
-
keyStoreType
Key store type- Parameters:
keyStoreType
- key store type- Returns:
- this
Configuration.Builder
-
trustStoreType
trust store type- Parameters:
trustStoreType
- trust store type- Returns:
- this
Configuration.Builder
-
password
User password- Parameters:
password
- password- Returns:
- this
Configuration.Builder
-
enabledSslProtocolSuites
Set ssl protocol list to user (comma separated)- Parameters:
enabledSslProtocolSuites
- set possible SSL(TLS) protocol to use- Returns:
- this
Configuration.Builder
-
fallbackToSystemKeyStore
Indicate if keystore system properties can be used.- Parameters:
fallbackToSystemKeyStore
- set if keystore system properties can be used.- Returns:
- this
Configuration.Builder
-
fallbackToSystemTrustStore
Indicate if system default truststore can be used.- Parameters:
fallbackToSystemTrustStore
- indicate if system default truststore can be used..- Returns:
- this
Configuration.Builder
-
database
Set default database- Parameters:
database
- database- Returns:
- this
Configuration.Builder
-
haMode
Set failover High-availability mode- Parameters:
haMode
- High-availability mode- Returns:
- this
Configuration.Builder
-
addHost
Add Host to possible addresses to connect- Parameters:
host
- hostname or IPport
- port- Returns:
- this
Configuration.Builder
-
addHost
Add Host to possible addresses to connect- Parameters:
host
- hostname or IPport
- portsslMode
- ssl mode. possible values disable/trust/verify-ca/verify-full- Returns:
- this
Configuration.Builder
-
addHost
Add Host to possible addresses to connect- Parameters:
host
- hostname or IPport
- portmaster
- is master or replica- Returns:
- this
Configuration.Builder
-
addHost
Add Host to possible addresses to connect- Parameters:
host
- hostname or IPport
- portmaster
- is master or replicasslMode
- ssl mode. possible values disable/trust/verify-ca/verify-full- Returns:
- this
Configuration.Builder
-
addPipeHost
Add a windows pipe host- Parameters:
pipe
- windows pipe path- Returns:
- this
Configuration.Builder
-
addLocalSocketHost
Add a unix socket host- Parameters:
localSocket
- unix socket path- Returns:
- this
Configuration.Builder
-
addresses
add host addresses- Parameters:
hostAddress
- host addresses- Returns:
- this
Configuration.Builder
-
addresses
add host addresses- Parameters:
hostAddress
- host addresses- Returns:
- this
Configuration.Builder
-
socketFactory
Socket factory- Parameters:
socketFactory
- socket factory- Returns:
- this
Configuration.Builder
-
connectTimeout
Indicate connect timeout value, in milliseconds, or zero for no timeout. Default: 30000- Parameters:
connectTimeout
- connect Timeout- Returns:
- this
Configuration.Builder
-
pipe
Indicate to use windows named pipe, specify named pipe name to connect- Parameters:
pipe
- windows named pipe- Returns:
- this
Configuration.Builder
-
localSocket
Indicate to use Unix domain socket, if the server allows it, specifying named pipe name to connect The value is the path of Unix domain socket (available with "select @@socket" command).- Parameters:
localSocket
- local socket path- Returns:
- this
Configuration.Builder
-
tcpKeepAlive
Indicate if TCP keep-alive must be enabled.- Parameters:
tcpKeepAlive
- value- Returns:
- this
Configuration.Builder
-
uuidAsString
Indicate if UUID fields must returns as String- Parameters:
uuidAsString
- value- Returns:
- this
Configuration.Builder
-
tcpKeepIdle
Indicate TCP keep-idle value (for java 11+ only).- Parameters:
tcpKeepIdle
- value- Returns:
- this
Configuration.Builder
-
tcpKeepCount
Indicate TCP keep-count value (for java 11+ only).- Parameters:
tcpKeepCount
- value- Returns:
- this
Configuration.Builder
-
tcpKeepInterval
Indicate TCP keep-interval value (for java 11+ only).- Parameters:
tcpKeepInterval
- value- Returns:
- this
Configuration.Builder
-
tcpAbortiveClose
Indicate that when connection fails, to send an RST TCP packet.- Parameters:
tcpAbortiveClose
- value- Returns:
- this
Configuration.Builder
-
geometryDefaultType
Indicate what default Object type Geometry a resultset.getObject must return. possibility :- null or empty is WKB byte array
- 'default' will return org.mariadb.mariadb.jdbc.type Object
- Parameters:
geometryDefault
- value- Returns:
- this
Configuration.Builder
-
restrictedAuth
restrict authentication method to secure list. Default "default".- Parameters:
restrictedAuth
- use authentication plugin list- Returns:
- this
Configuration.Builder
-
initSql
permit to execute an SQL command on connection creation- Parameters:
initSql
- initial SQL command- Returns:
- this
Configuration.Builder
-
localSocketAddress
Indicate Hostname or IP address to bind the connection socket to a local (UNIX domain) socket.- Parameters:
localSocketAddress
- Hostname or IP address- Returns:
- this
Configuration.Builder
-
socketTimeout
Indicate the network socket timeout (SO_TIMEOUT) in milliseconds. Value of 0 disables this timeout.If the goal is to set a timeout for all queries, the server has permitted a solution to limit the query time by setting a system variable, max_statement_time. Default: 0
- Parameters:
socketTimeout
- socket timeout value- Returns:
- this
Configuration.Builder
-
allowMultiQueries
Indicate that multi-queries are allowed. example: "insert into ab (i) values (1); insert into ab (i) values (2)".If application build sql command string, this is probably a bad idea to enable this option, opening the door to sql injection. default: false.
- Parameters:
allowMultiQueries
- indicate if active- Returns:
- this
Configuration.Builder
-
allowLocalInfile
Indicate if LOAD DATA LOCAL INFILE are permitted. This will disable all pipelining implementation.- Parameters:
allowLocalInfile
- indicate if permit LOAD DATA LOCAL INFILE commands- Returns:
- this
Configuration.Builder
-
useCompression
Indicate to compress exchanges with the database through gzip. This permits better performance when the database is not in the same location.- Parameters:
useCompression
- to enable/disable compression- Returns:
- this
Configuration.Builder
-
blankTableNameMeta
Set blank table name for metadata (old oracle compatibility)- Parameters:
blankTableNameMeta
- use blank table name- Returns:
- this
Configuration.Builder
-
credentialType
set credential plugin type- Parameters:
credentialType
- credential plugin type- Returns:
- this
Configuration.Builder
-
sslMode
Set ssl model- Parameters:
sslMode
- ssl requirement- Returns:
- this
Configuration.Builder
-
transactionIsolation
force default transaction isolation, not using server default- Parameters:
transactionIsolation
- indicate default transaction isolation- Returns:
- this
Configuration.Builder
-
enabledSslCipherSuites
set possible cipher list (comma separated), not using default java cipher list- Parameters:
enabledSslCipherSuites
- ssl cipher list- Returns:
- this
Configuration.Builder
-
sessionVariables
set connection session variables (comma separated)- Parameters:
sessionVariables
- session variable list- Returns:
- this
Configuration.Builder
-
tinyInt1isBit
TinyInt(1) to be considered as bit- Parameters:
tinyInt1isBit
- Indicate if Tinyint(1) to be considered as bit- Returns:
- this
Configuration.Builder
-
transformedBitIsBoolean
TinyInt(1) to be considered as boolean- Parameters:
transformedBitIsBoolean
- Indicate if Tinyint(1) to be considered as boolean- Returns:
- this
Configuration.Builder
-
yearIsDateType
Year datatype to be considered as date- Parameters:
yearIsDateType
- indicate if Year must be considered as Date- Returns:
- this
Configuration.Builder
-
timezone
Force timezone to use this timezone, not default java one- Parameters:
timezone
- default timezone- Returns:
- this
Configuration.Builder
-
connectionTimeZone
indicate what timestamp timezone to use in exchanges with server possible value are LOCAL|SERVER|user-defined time zone- Parameters:
connectionTimeZone
- default timezone- Returns:
- this
Configuration.Builder
-
forceConnectionTimeZoneToSession
public Configuration.Builder forceConnectionTimeZoneToSession(Boolean forceConnectionTimeZoneToSession) Indicate if connectionTimeZone must be forced to session- Parameters:
forceConnectionTimeZoneToSession
- must connector force connection timezone- Returns:
- this
Configuration.Builder
-
preserveInstants
Indicate if connection must preserve instants- Parameters:
preserveInstants
- must connector preserve instants- Returns:
- this
Configuration.Builder
-
dumpQueriesOnException
Must queries be dump on exception stracktrace.- Parameters:
dumpQueriesOnException
- must queries be dump on exception- Returns:
- this
Configuration.Builder
-
prepStmtCacheSize
If using server prepared statement, set LRU prepare cache size- Parameters:
prepStmtCacheSize
- prepare cache size- Returns:
- this
Configuration.Builder
-
useAffectedRows
Indicate server to return affected rows in place of found rows. This impact the return number of rows affected by update- Parameters:
useAffectedRows
- Indicate to user affected rows in place of found rows- Returns:
- this
Configuration.Builder
-
useServerPrepStmts
Indicate to use Client or Server prepared statement- Parameters:
useServerPrepStmts
- use Server prepared statement- Returns:
- this
Configuration.Builder
-
connectionAttributes
Additional connection attributes to identify connection- Parameters:
connectionAttributes
- additional connection attributes- Returns:
- this
Configuration.Builder
-
useBulkStmts
Use server dedicated bulk batch command- Parameters:
useBulkStmts
- use server bulk batch command.- Returns:
- this
Configuration.Builder
-
useBulkStmtsForInserts
Use server dedicated bulk batch command for insert (if useBulkStmts is enabled, useBulkStmtsForInserts will be enabled as well)- Parameters:
useBulkStmtsForInserts
- use server bulk batch command.- Returns:
- this
Configuration.Builder
-
disablePipeline
Disable pipeline- Parameters:
disablePipeline
- disable pipeline.- Returns:
- this
Configuration.Builder
-
autocommit
Permit to force autocommit connection value- Parameters:
autocommit
- autocommit value- Returns:
- this
Configuration.Builder
-
useMysqlMetadata
Permit indicating to force DatabaseMetadata.getDatabaseProductName() to return `MySQL` as database type, not real database type- Parameters:
useMysqlMetadata
- force DatabaseMetadata.getDatabaseProductName() to return `MySQL`- Returns:
- this
Configuration.Builder
-
nullDatabaseMeansCurrent
Permit indicating in DatabaseMetadata if null value must be considered current schema/catalog- Parameters:
nullDatabaseMeansCurrent
- indicating in DatabaseMetadata if null value must be considered current schema/catalog- Returns:
- this
Configuration.Builder
-
useCatalogTerm
"schema" and "database" are server synonymous. Connector historically get/set database using Connection.setCatalog()/getCatalog(), setSchema()/getSchema() being no-op This parameter indicate to change that behavior to use Schema in place of Catalog. Behavior will change- database change will be done with either Connection.setCatalog()/getCatalog() or Connection.setSchema()/getSchema()
- DatabaseMetadata methods that use catalog or schema filtering
- ResultsetMetadata database will be retrieved
- Parameters:
useCatalogTerm
- use CATALOG/SCHEMA- Returns:
- this
Configuration.Builder
-
createDatabaseIfNotExist
Create database if not exist. This is mainly for test, since does require an additional query after connection- Parameters:
createDatabaseIfNotExist
- must driver create database if doesn't exist- Returns:
- this
Configuration.Builder
-
useLocalSessionState
indicate if connector can use local state to avoid unnecessary queries. This means application must use JDBC dedicated methods, like connection.setTransactionIsolation and never queries like "SET SESSION TRANSACTION ISOLATION LEVEL X" directly- Parameters:
useLocalSessionState
- can driver rely on local state- Returns:
- this
Configuration.Builder
-
returnMultiValuesGeneratedIds
indicate if connector must return multi-generated ids. (For connector 2.x compatibility)- Parameters:
returnMultiValuesGeneratedIds
- must return multi-values generated ids- Returns:
- this
Configuration.Builder
-
jdbcCompliantTruncation
indicate if connector must force sql_mode strict mode for jdbc compliance- Parameters:
jdbcCompliantTruncation
- must force sql_mode strict mode for jdbc compliance- Returns:
- this
Configuration.Builder
-
permitRedirect
indicate if connector must redirect connection when receiving server redirect information- Parameters:
permitRedirect
- must redirect when required- Returns:
- this
Configuration.Builder
-
pinGlobalTxToPhysicalConnection
public Configuration.Builder pinGlobalTxToPhysicalConnection(Boolean pinGlobalTxToPhysicalConnection) Indicate if for XA transaction, connector must reuse same connection.- Parameters:
pinGlobalTxToPhysicalConnection
- force reuse of same connection- Returns:
- this
Configuration.Builder
-
includeInnodbStatusInDeadlockExceptions
public Configuration.Builder includeInnodbStatusInDeadlockExceptions(Boolean includeInnodbStatusInDeadlockExceptions) On dead-lock exception must add innodb status in exception error message. If enabled, an additional command will be done to retrieve innodb status when dead-lock occurs.- Parameters:
includeInnodbStatusInDeadlockExceptions
- Must dead-lock exception must add innodb status in exception error message- Returns:
- this
Configuration.Builder
-
includeThreadDumpInDeadlockExceptions
public Configuration.Builder includeThreadDumpInDeadlockExceptions(Boolean includeThreadDumpInDeadlockExceptions) Dead-lock error will contain threads information- Parameters:
includeThreadDumpInDeadlockExceptions
- must dead-lock error contain treads informations- Returns:
- this
Configuration.Builder
-
servicePrincipalName
set service principal name (GSSAPI)- Parameters:
servicePrincipalName
- service principal name (GSSAPI)- Returns:
- this
Configuration.Builder
-
defaultFetchSize
Set default fetch size- Parameters:
defaultFetchSize
- default fetch size- Returns:
- this
Configuration.Builder
-
tlsSocketType
Permit to defined default tls plugin type- Parameters:
tlsSocketType
- default tls socket plugin to use- Returns:
- this
Configuration.Builder
-
maxQuerySizeToLog
Set the log size limit for query- Parameters:
maxQuerySizeToLog
- set query size limit- Returns:
- this
Configuration.Builder
-
maxAllowedPacket
Indicate to driver server max_allowed_packet. This permit to driver to avoid sending commands too big, that would have make server to drop connection- Parameters:
maxAllowedPacket
- indicate server max_allowed_packet value- Returns:
- this
Configuration.Builder
-
retriesAllDown
When failover occurs, how many connection attempt before throwing error when reconnecting- Parameters:
retriesAllDown
- number of attemps to reconnect- Returns:
- this
Configuration.Builder
-
galeraAllowedState
Indicate galera allowed state (comma separated), permitting to validate if galera node is synchronized- Parameters:
galeraAllowedState
- galera allowed state- Returns:
- this
Configuration.Builder
-
pool
Create pool if not existing, or get a connection for the pool associate with this connection string if existing.- Parameters:
pool
- use pool- Returns:
- this
Configuration.Builder
-
poolName
set pool name- Parameters:
poolName
- pool name- Returns:
- this
Configuration.Builder
-
maxPoolSize
Set the limit number of connection in pool.- Parameters:
maxPoolSize
- maximum connection size in pool.- Returns:
- this
Configuration.Builder
-
minPoolSize
Minimum pool size.- Parameters:
minPoolSize
- minimum pool size- Returns:
- this
Configuration.Builder
-
maxIdleTime
Set the maximum idle time of a connection indicating that connection must be released- Parameters:
maxIdleTime
- maximum idle time of a connection in pool- Returns:
- this
Configuration.Builder
-
registerJmxPool
Must pool register JMX information- Parameters:
registerJmxPool
- register pool to JMX- Returns:
- this
Configuration.Builder
-
poolValidMinDelay
Pool will validate connection before giving it. This amount of time indicate that recently use connection can skip validation 0 means connection will be validated each time (even is just used)- Parameters:
poolValidMinDelay
- time limit indicating that connection in pool must be validated- Returns:
- this
Configuration.Builder
-
useResetConnection
Indicate that connection returned to pool must be RESETed like having proper connection state.- Parameters:
useResetConnection
- use reset connection when returning connection to pool.- Returns:
- this
Configuration.Builder
-
serverRsaPublicKeyFile
MySQL Authentication RSA server file, for mysql authentication- Parameters:
serverRsaPublicKeyFile
- server RSA public key file- Returns:
- this
Configuration.Builder
-
allowPublicKeyRetrieval
Allow RSA server file retrieval from MySQL server- Parameters:
allowPublicKeyRetrieval
- Allow RSA server file retrieval from MySQL server- Returns:
- this
Configuration.Builder
-
useReadAheadInput
Cache all socket available information.- Parameters:
useReadAheadInput
- cache available socket data when reading socket.- Returns:
- this
Configuration.Builder
-
cachePrepStmts
Cache server prepare result- Parameters:
cachePrepStmts
- cache server prepared result- Returns:
- this
Configuration.Builder
-
transactionReplay
Must cache commands in transaction and replay transaction on failover.- Parameters:
transactionReplay
- cache transaction and replay on failover- Returns:
- this
Configuration.Builder
-
transactionReplaySize
Transaction replay cache size- Parameters:
transactionReplaySize
- transaction replay cache size- Returns:
- this
Configuration.Builder
-
build
Build a configuration- Returns:
- a Configuration object
- Throws:
SQLException
- if option data type doesn't correspond
-