Class Configuration
- java.lang.Object
-
- org.mariadb.jdbc.Configuration
-
public class Configuration extends java.lang.Objectparse and verification of URL.basic syntax :
jdbc:mariadb:[replication:|failover|loadbalance:|aurora:]//<hostDescription>[,<hostDescription>]/[database>] [?<key1>=<value1>[&<key2>=<value2>]]hostDescription:
- simple :
<host>:<portnumber>
(for example localhost:3306)
- complex :
address=[(type=(master|slave))][(port=<portnumber>)](host=<host>)
type is by default master
port is by default 3306
host can be dns name, ipv4 or ipv6.
in case of ipv6 and simple host description, the ip must be written inside bracket.
exemple :jdbc:mariadb://[2001:0660:7401:0200:0000:0000:0edf:bdd7]:3306
Some examples :
jdbc:mariadb://localhost:3306/database?user=greg&password=pass
jdbc:mariadb://address=(type=master)(host=master1),address=(port=3307)(type=slave)(host=slave1)/database?user=greg&password=pass
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfiguration.BuilderA builder forConfigurationinstances.private static classConfiguration.ParameterAppender
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<HostAddress>addressesprivate booleanallowLocalInfileprivate booleanallowMultiQueriesprivate booleanallowPublicKeyRetrievalprivate java.lang.Booleanautocommitprivate booleanblankTableNameMetaprivate booleancacheCodecsprivate static Codec<?>[]cachedCodecsprivate booleancachePrepStmtsprivate static java.lang.StringCATALOG_TERMprivate Codec<?>[]codecsprivate java.lang.StringconnectionAttributesprivate java.lang.StringconnectionCollationprivate java.lang.StringconnectionTimeZoneprivate intconnectTimeoutprivate booleancreateDatabaseIfNotExistprivate CredentialPlugincredentialTypeprivate java.lang.Stringdatabaseprivate intdefaultFetchSizeprivate booleandisablePipelineprivate booleandisconnectOnExpiredPasswordsprivate booleandumpQueriesOnExceptionprivate java.lang.StringenabledSslCipherSuitesprivate java.lang.StringenabledSslProtocolSuitesprivate static java.util.Set<java.lang.String>EXCLUDED_FIELDSprivate booleanfallbackToSystemKeyStoreprivate booleanfallbackToSystemTrustStoreprivate java.lang.BooleanforceConnectionTimeZoneToSessionprivate java.lang.StringgaleraAllowedStateprivate java.lang.StringgeometryDefaultTypeprivate HaModehaModeprivate booleanincludeInnodbStatusInDeadlockExceptionsprivate booleanincludeThreadDumpInDeadlockExceptionsprivate java.lang.StringinitialUrlprivate java.lang.StringinitSqlprivate booleanjdbcCompliantTruncationprivate java.lang.StringkeyPasswordprivate java.lang.StringkeyStoreprivate java.lang.StringkeyStorePasswordprivate java.lang.StringkeyStoreTypeprivate java.lang.StringlocalSocketprivate java.lang.StringlocalSocketAddressprivate static Loggerloggerprivate intmaxAllowedColumnsprivate java.lang.IntegermaxAllowedPacketprivate intmaxIdleTimeprivate intmaxPoolSizeprivate intmaxQuerySizeToLogprivate MetaExportedKeysmetaExportedKeysprivate intminPoolSizeprivate java.util.PropertiesnonMappedOptionsprivate booleannullDatabaseMeansCurrentprivate booleanoldModeNoPrecisionTimestampprivate java.lang.Stringpasswordprivate booleanpermitNoResultsprivate java.lang.BooleanpermitRedirectprivate booleanpinGlobalTxToPhysicalConnectionprivate java.lang.Stringpipeprivate booleanpoolprivate java.lang.StringpoolNameprivate intpoolValidMinDelayprivate intprepStmtCacheSizeprivate booleanpreserveInstantsprivate static java.util.Set<java.lang.String>PROPERTIES_TO_SKIPprivate booleanpureLocalDateTimeprivate booleanreadOnlyPropagatesToServerprivate booleanregisterJmxPoolprivate java.lang.StringrestrictedAuthprivate intretriesAllDownprivate booleanreturnMultiValuesGeneratedIdsprivate booleanrewriteBatchedStatementsprivate static java.lang.StringSCHEMA_TERMprivate static java.util.Set<java.lang.String>SECURE_FIELDSprivate static java.util.Set<java.lang.String>SENSITIVE_FIELDSprivate java.lang.StringserverRsaPublicKeyFileprivate java.lang.StringserverSslCertprivate java.lang.StringservicePrincipalNameprivate java.lang.StringsessionVariablesprivate java.lang.StringsocketFactoryprivate intsocketTimeoutprivate SslModesslModeprivate booleantcpAbortiveCloseprivate booleantcpKeepAliveprivate inttcpKeepCountprivate inttcpKeepIdleprivate inttcpKeepIntervalprivate java.lang.Stringtimezoneprivate booleantinyInt1isBitprivate java.lang.StringtlsSocketTypeprivate TransactionIsolationtransactionIsolationprivate booleantransactionReplayprivate inttransactionReplaySizeprivate booleantransformedBitIsBooleanprivate java.lang.StringtrustStoreprivate java.lang.StringtrustStorePasswordprivate java.lang.StringtrustStoreTypeprivate booleanuseAffectedRowsprivate booleanuseBulkStmtsprivate booleanuseBulkStmtsForInsertsprivate CatalogTermuseCatalogTermprivate booleanuseCompressionprivate booleanuseIpForKillQueryprivate booleanuseLocalSessionStateprivate booleanuseMysqlMetadataprivate java.lang.Stringuserprivate booleanuseReadAheadInputprivate booleanuseResetConnectionprivate booleanuseServerPrepStmtsprivate booleanuuidAsStringprivate booleanyearIsDateType
-
Constructor Summary
Constructors Modifier Constructor Description privateConfiguration(Configuration.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanacceptsUrl(java.lang.String url)Tell if mariadb driver accept url string.java.util.List<HostAddress>addresses()addressesbooleanallowLocalInfile()permits LOAD LOCAL INFILE commandsbooleanallowMultiQueries()permit using multi queries commandbooleanallowPublicKeyRetrieval()permit mysql authentication to retrieve server certificateprivate static voidappendBasicConfiguration(java.lang.StringBuilder sb, Configuration conf)private static voidappendBooleanParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)private static voidappendCatalogTermParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)private static voidappendConfigurationParameters(java.lang.StringBuilder sb, Configuration conf, boolean hideSensitive)private static voidappendCredentialPluginParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)private static voidappendDatabase(java.lang.StringBuilder sb, Configuration conf)private static voidappendDefaultOptions(java.lang.StringBuilder sb, Configuration conf, Configuration defaultConf)private static voidappendDefaultParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)private static voidappendFieldParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf, boolean hideSensitive)private static voidappendHaModeField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)private static voidappendHaModeIfPresent(java.lang.StringBuilder sb, Configuration conf)private static voidappendHostAddress(java.lang.StringBuilder sb, Configuration conf, HostAddress hostAddress, int index)private static voidappendHostAddresses(java.lang.StringBuilder sb, Configuration conf)private static voidappendIntParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)private static voidappendListField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)private static voidappendNonDefaultOptions(java.lang.StringBuilder sb, Configuration conf, Configuration defaultConf)private static voidappendNullField(java.lang.reflect.Field field, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)private static voidappendPropertiesParameter(Configuration.ParameterAppender appender, java.util.Properties props, boolean hideSensitive)private static voidappendSimpleField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)private static voidappendStringParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)private static voidappendUnknownOptions(java.lang.StringBuilder sb, Configuration conf)java.lang.Booleanautocommit()Force session autocommit on connection creationbooleanblankTableNameMeta()force returning blank table metadata (for old oracle compatibility)protected static java.lang.StringbuildUrl(Configuration conf, boolean hideSensitive)Builds a JDBC URL from the provided configuration.booleancachePrepStmts()Cache prepared statement result.Configurationclone(java.lang.String username, java.lang.String password)Clone configuration with another user/passwordCodec<?>[]codecs()datatype Encoder/decoder listprivate voidconfigureHosts()java.lang.StringconnectionAttributes()Connections attributesjava.lang.StringconnectionCollation()get connectionCollationjava.lang.StringconnectionTimeZone()Set connectionTimeZoneintconnectTimeout()socket connect timeoutbooleancreateDatabaseIfNotExist()create database if not existCredentialPlugincredentialPlugin()credential plugin to usejava.lang.StringcredentialType()java.lang.Stringdatabase()Connection default databaseintdefaultFetchSize()result-set streaming default fetch sizebooleandisablePipeline()Disable pipeline.booleandisconnectOnExpiredPasswords()On connection creation, indicate behavior when password is expired.booleandumpQueriesOnException()Must query by logged on exception.java.lang.StringenabledSslCipherSuites()autorized cipher list.java.lang.StringenabledSslProtocolSuites()permitted ssl protocol list (comma separated)booleanequals(java.lang.Object o)private static java.lang.StringextractDatabase(java.lang.String additionalParameters, int optIndex)booleanfallbackToSystemKeyStore()Indicate if keyStore option is not set to use keystore system property like "javax.net.ssl.keyStore"booleanfallbackToSystemTrustStore()Indicate if system default truststore implementation can be usedjava.lang.BooleanforceConnectionTimeZoneToSession()forceConnectionTimeZoneToSession must connection timezone be forcedjava.lang.StringgaleraAllowedState()Galera comma separated allowed statejava.lang.StringgeometryDefaultType()geometry default decoding implementationprivate static java.lang.StringgetRealKey(java.lang.String key)HaModehaMode()High availability modeprivate static voidhandleBooleanField(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object value, java.lang.Object originalKey)private static voidhandleIntegerField(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object value, java.lang.Object originalKey)private static voidhandleLegacySslSettings(Configuration.Builder builder, java.util.Properties nonMappedOptions)private static voidhandleStringField(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object value)inthashCode()booleanhavePrimaryHostOnly()booleanincludeInnodbStatusInDeadlockExceptions()On deadlock exception, must driver execute additional commands to show innodb status in error description.booleanincludeThreadDumpInDeadlockExceptions()On deadlock exception, must driver display threads information on error description.private voidinitializeAdditionalConfig(Configuration.Builder builder)private voidinitializeBasicConfig(Configuration.Builder builder)private voidinitializeBulkConfig(Configuration.Builder builder)private voidinitializeDatabaseConfig(Configuration.Builder builder)private voidinitializeDataTypeConfig(Configuration.Builder builder)private voidinitializeExceptionConfig(Configuration.Builder builder)private voidinitializePipelineConfig(Configuration.Builder builder)private voidinitializePoolConfig(Configuration.Builder builder)private voidinitializeQueryConfig(Configuration.Builder builder)private voidinitializeSecurityConfig(Configuration.Builder builder)private voidinitializeSocketConfig(Configuration.Builder builder)private voidinitializeSslConfig(Configuration.Builder builder)private voidinitializeTimezoneConfig(Configuration.Builder builder)private voidinitializeTransactionConfig(Configuration.Builder builder)protected java.lang.StringinitialUrl()Configuration generated URL depending on current configuration option.java.lang.StringinitSql()Execute initial command when connection is establishedprivate static booleanisSensitiveOption(java.lang.String key)A credential that has no dedicated field is kept in nonMappedOptions, e.g.private static booleanisSet(java.lang.String key, java.util.Properties nonMappedOptions)booleanjdbcCompliantTruncation()Force sql_mode to strict mode for JDBC compliancejava.lang.StringkeyPassword()key store alias passwordjava.lang.StringkeyStore()key storejava.lang.StringkeyStorePassword()key store passwordjava.lang.StringkeyStoreType()key store type (to replace default javax.net.ssl.keyStoreType system property)private voidloadCodecs()java.lang.StringlocalSocket()local socket configurationjava.lang.StringlocalSocketAddress()local socket address pathprivate static voidmapPropertiesToOption(Configuration.Builder builder, java.util.Properties properties)intmaxAllowedColumns()Maximum number of columns the driver will accept in a result-set or prepare metadata received from the server.java.lang.IntegermaxAllowedPacket()Maximum size (in bytes) of a packet the driver will send or receive.intmaxIdleTime()Max idle timeintmaxPoolSize()max pool sizeintmaxQuerySizeToLog()query maximum size to log (query will be truncated of more than this limit)MetaExportedKeysmetaExportedKeys()Default metadata getExportedKeys implementation.intminPoolSize()Minimum pool sizejava.util.PropertiesnonMappedOptions()non standard optionsbooleannullDatabaseMeansCurrent()When enable, in DatabaseMetadata, will handle null database/schema (depending on UseCatalog=catalog/schema) as currentprivate static java.lang.StringnullOrEmpty(java.lang.String val)booleanoldModeNoPrecisionTimestamp()Force Timestamp string representation compatible to 2.7 version Timestamp string representation will then correspond to Timestamp.toString() in place of taking field precisionstatic Configurationparse(java.lang.String url)parse connection stringstatic Configurationparse(java.lang.String url, java.util.Properties prop)Parse url connection string with additional properties.private static HaModeparseHaMode(java.lang.String url, int separator)private static ConfigurationparseInternal(java.lang.String url, java.util.Properties properties)Parses the connection URL in order to set the UrlParser instance with all the information provided through the URL.java.lang.Stringpassword()configuration passwordbooleanpermitNoResults()Indicate if Statement/PreparedStatement.executeQuery for command that produce no result will return an exception or just an empty result-setjava.lang.BooleanpermitRedirect()must client redirect when requiredbooleanpinGlobalTxToPhysicalConnection()When enabled, ensure that for XA operation to use the same connectionjava.lang.Stringpipe()Pipe pathbooleanpool()Create pooljava.lang.StringpoolName()pool nameintpoolValidMinDelay()Pool mininum validation delay.intprepStmtCacheSize()Prepare statement cache size.booleanpreserveInstants()Must timezone change preserve instantsprivate static voidprocessDatabaseAndParameters(java.lang.String additionalParameters, Configuration.Builder builder, java.util.Properties properties)private static voidprocessField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)private static voidprocessFields(Configuration conf, Configuration defaultConf, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)private static voidprocessProperties(Configuration.Builder builder, java.util.Properties properties, java.util.Properties nonMappedOptions)private static voidprocessProperty(Configuration.Builder builder, java.lang.String realKey, java.lang.Object propertyValue, java.lang.Object originalKey, java.util.Properties nonMappedOptions)private static voidprocessUrlParameters(java.lang.String urlParameters, java.util.Properties properties)booleanpureLocalDateTime()Whether LocalDateTime is handled as a pure zoneless wall-clock value (default true), matching SQL DATETIME semantics.booleanreadOnlyPropagatesToServer()When enabled (the default),Connection.setReadOnly(boolean)on a single-host connection propagates the read-only state to the server by issuingSET SESSION TRANSACTION READ ONLY/READ WRITE, for servers >= 5.6.5.booleanregisterJmxPool()register pool information to JMXjava.lang.StringrestrictedAuth()Restrict authentication plugin to comma separated plugin listintretriesAllDown()retry the maximum retry number of attempts to reconnect after a failover.booleanreturnMultiValuesGeneratedIds()Returns multi-values generated ids.booleanrewriteBatchedStatements()java.lang.StringserverRsaPublicKeyFile()Server RSA public key file for caching_sha2_password authenticationjava.lang.StringserverSslCert()server ssl certificate (file path / certificat content)java.lang.StringservicePrincipalName()Service principal name (GSSAPI option)java.lang.StringsessionVariables()coma separated Session variable listprivate static voidsetFieldValue(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object propertyValue, java.lang.Object originalKey)private static booleanshouldUseSimpleHostFormat(Configuration conf, HostAddress hostAddress, int index)private static intskipComplexAddresses(java.lang.String urlSecondPart)java.lang.StringsocketFactory()Socket factory class nameintsocketTimeout()socket timeoutSslModesslMode()SSl modebooleantcpAbortiveClose()close using TCP abortive close (RST TCP packet, in place or FIN packet)booleantcpKeepAlive()socket tcp keep aliveinttcpKeepCount()socket tcp keep count (java 11+ only)inttcpKeepIdle()socket tcp keep idle (java 11+ only)inttcpKeepInterval()socket tcp keep interval (java 11+ only)java.lang.Stringtimezone()Set timezonebooleantinyInt1isBit()Must tinyint(1) be considered as Bitjava.lang.StringtlsSocketType()TLS socket typeConfiguration.BuildertoBuilder()Create a Builder from current configuration.static java.lang.StringtoConf(java.lang.String url)Permit to have string information on how string is parsed.java.lang.StringtoString()ToString implementation.TransactionIsolationtransactionIsolation()Default transaction isolationbooleantransactionReplay()implements transaction replay failoverinttransactionReplaySize()transaction replay maximum number of saved command.booleantransformedBitIsBoolean()Must tinyint(1) be considered as Boolean or Bitjava.lang.StringtrustStore()trust storejava.lang.StringtrustStorePassword()trust store passwordjava.lang.StringtrustStoreType()trust store type (to replace default javax.net.ssl.keyStoreType system property)booleanuseAffectedRows()Use affected rowbooleanuseBulkStmts()Use server COM_STMT_BULK for batching.booleanuseBulkStmtsForInserts()Use server COM_STMT_BULK for batching inserts.CatalogTermuseCatalogTerm()Indicating using Catalog or SchemabooleanuseCompression()Enable compression if server has compression capabilitybooleanuseIpForKillQuery()WhetherConnection.cancelCurrentQuery()should reuse the current socket IP instead of the original hostname when opening the kill connection.booleanuseLocalSessionState()use local state to avoid unnecessary queries.booleanuseMysqlMetadata()Force returning MySQL metadata informationjava.lang.Stringuser()configuration userbooleanuseReadAheadInput()Read all data from socket in advancebooleanuseResetConnection()Must connection returned to pool be RESETbooleanuseServerPrepStmts()Use server prepared statement.booleanuuidAsString()must uuid fields return as String and not java.util.UUIDprivate voidvalidateConfiguration()private voidvalidateIntegerFields()private static voidvalidateUrlFormat(java.lang.String url)booleanyearIsDateType()Must year be return by default as Date in result-set
-
-
-
Field Detail
-
logger
private static final Logger logger
-
EXCLUDED_FIELDS
private static final java.util.Set<java.lang.String> EXCLUDED_FIELDS
-
SECURE_FIELDS
private static final java.util.Set<java.lang.String> SECURE_FIELDS
-
PROPERTIES_TO_SKIP
private static final java.util.Set<java.lang.String> PROPERTIES_TO_SKIP
-
SENSITIVE_FIELDS
private static final java.util.Set<java.lang.String> SENSITIVE_FIELDS
-
CATALOG_TERM
private static final java.lang.String CATALOG_TERM
- See Also:
- Constant Field Values
-
SCHEMA_TERM
private static final java.lang.String SCHEMA_TERM
- See Also:
- Constant Field Values
-
cachedCodecs
private static volatile Codec<?>[] cachedCodecs
-
user
private java.lang.String user
-
password
private java.lang.String password
-
database
private java.lang.String database
-
addresses
private java.util.List<HostAddress> addresses
-
haMode
private HaMode haMode
-
initialUrl
private java.lang.String initialUrl
-
nonMappedOptions
private java.util.Properties nonMappedOptions
-
timezone
private java.lang.String timezone
-
connectionCollation
private java.lang.String connectionCollation
-
connectionTimeZone
private java.lang.String connectionTimeZone
-
forceConnectionTimeZoneToSession
private java.lang.Boolean forceConnectionTimeZoneToSession
-
preserveInstants
private boolean preserveInstants
-
pureLocalDateTime
private boolean pureLocalDateTime
-
autocommit
private java.lang.Boolean autocommit
-
useMysqlMetadata
private boolean useMysqlMetadata
-
nullDatabaseMeansCurrent
private boolean nullDatabaseMeansCurrent
-
useCatalogTerm
private CatalogTerm useCatalogTerm
-
createDatabaseIfNotExist
private boolean createDatabaseIfNotExist
-
useLocalSessionState
private boolean useLocalSessionState
-
readOnlyPropagatesToServer
private boolean readOnlyPropagatesToServer
-
returnMultiValuesGeneratedIds
private boolean returnMultiValuesGeneratedIds
-
jdbcCompliantTruncation
private boolean jdbcCompliantTruncation
-
oldModeNoPrecisionTimestamp
private boolean oldModeNoPrecisionTimestamp
-
permitRedirect
private java.lang.Boolean permitRedirect
-
transactionIsolation
private TransactionIsolation transactionIsolation
-
defaultFetchSize
private int defaultFetchSize
-
maxQuerySizeToLog
private int maxQuerySizeToLog
-
maxAllowedPacket
private java.lang.Integer maxAllowedPacket
-
maxAllowedColumns
private int maxAllowedColumns
-
geometryDefaultType
private java.lang.String geometryDefaultType
-
restrictedAuth
private java.lang.String restrictedAuth
-
initSql
private java.lang.String initSql
-
pinGlobalTxToPhysicalConnection
private boolean pinGlobalTxToPhysicalConnection
-
permitNoResults
private boolean permitNoResults
-
cacheCodecs
private boolean cacheCodecs
-
metaExportedKeys
private MetaExportedKeys metaExportedKeys
-
socketFactory
private java.lang.String socketFactory
-
connectTimeout
private int connectTimeout
-
pipe
private java.lang.String pipe
-
localSocket
private java.lang.String localSocket
-
uuidAsString
private boolean uuidAsString
-
tcpKeepAlive
private boolean tcpKeepAlive
-
tcpKeepIdle
private int tcpKeepIdle
-
tcpKeepCount
private int tcpKeepCount
-
tcpKeepInterval
private int tcpKeepInterval
-
tcpAbortiveClose
private boolean tcpAbortiveClose
-
localSocketAddress
private java.lang.String localSocketAddress
-
socketTimeout
private int socketTimeout
-
useReadAheadInput
private boolean useReadAheadInput
-
tlsSocketType
private java.lang.String tlsSocketType
-
sslMode
private SslMode sslMode
-
serverSslCert
private java.lang.String serverSslCert
-
keyStore
private java.lang.String keyStore
-
trustStore
private java.lang.String trustStore
-
keyStorePassword
private java.lang.String keyStorePassword
-
trustStorePassword
private java.lang.String trustStorePassword
-
keyPassword
private java.lang.String keyPassword
-
keyStoreType
private java.lang.String keyStoreType
-
trustStoreType
private java.lang.String trustStoreType
-
enabledSslCipherSuites
private java.lang.String enabledSslCipherSuites
-
enabledSslProtocolSuites
private java.lang.String enabledSslProtocolSuites
-
fallbackToSystemKeyStore
private boolean fallbackToSystemKeyStore
-
fallbackToSystemTrustStore
private boolean fallbackToSystemTrustStore
-
allowMultiQueries
private boolean allowMultiQueries
-
allowLocalInfile
private boolean allowLocalInfile
-
rewriteBatchedStatements
private boolean rewriteBatchedStatements
-
useCompression
private boolean useCompression
-
useAffectedRows
private boolean useAffectedRows
-
useBulkStmts
private boolean useBulkStmts
-
useBulkStmtsForInserts
private boolean useBulkStmtsForInserts
-
disablePipeline
private boolean disablePipeline
-
cachePrepStmts
private boolean cachePrepStmts
-
prepStmtCacheSize
private int prepStmtCacheSize
-
useServerPrepStmts
private boolean useServerPrepStmts
-
credentialType
private CredentialPlugin credentialType
-
sessionVariables
private java.lang.String sessionVariables
-
connectionAttributes
private java.lang.String connectionAttributes
-
servicePrincipalName
private java.lang.String servicePrincipalName
-
disconnectOnExpiredPasswords
private boolean disconnectOnExpiredPasswords
-
blankTableNameMeta
private boolean blankTableNameMeta
-
tinyInt1isBit
private boolean tinyInt1isBit
-
transformedBitIsBoolean
private boolean transformedBitIsBoolean
-
yearIsDateType
private boolean yearIsDateType
-
dumpQueriesOnException
private boolean dumpQueriesOnException
-
includeInnodbStatusInDeadlockExceptions
private boolean includeInnodbStatusInDeadlockExceptions
-
includeThreadDumpInDeadlockExceptions
private boolean includeThreadDumpInDeadlockExceptions
-
retriesAllDown
private int retriesAllDown
-
galeraAllowedState
private java.lang.String galeraAllowedState
-
transactionReplay
private boolean transactionReplay
-
transactionReplaySize
private int transactionReplaySize
-
useIpForKillQuery
private boolean useIpForKillQuery
-
pool
private boolean pool
-
poolName
private java.lang.String poolName
-
maxPoolSize
private int maxPoolSize
-
minPoolSize
private int minPoolSize
-
maxIdleTime
private int maxIdleTime
-
registerJmxPool
private boolean registerJmxPool
-
poolValidMinDelay
private int poolValidMinDelay
-
useResetConnection
private boolean useResetConnection
-
serverRsaPublicKeyFile
private java.lang.String serverRsaPublicKeyFile
-
allowPublicKeyRetrieval
private boolean allowPublicKeyRetrieval
-
codecs
private Codec<?>[] codecs
-
-
Constructor Detail
-
Configuration
private Configuration(Configuration.Builder builder)
-
-
Method Detail
-
initializeBasicConfig
private void initializeBasicConfig(Configuration.Builder builder)
-
initializeSslConfig
private void initializeSslConfig(Configuration.Builder builder)
-
initializeSocketConfig
private void initializeSocketConfig(Configuration.Builder builder)
-
initializeTransactionConfig
private void initializeTransactionConfig(Configuration.Builder builder)
-
initializeDataTypeConfig
private void initializeDataTypeConfig(Configuration.Builder builder)
-
initializeTimezoneConfig
private void initializeTimezoneConfig(Configuration.Builder builder)
-
initializeQueryConfig
private void initializeQueryConfig(Configuration.Builder builder)
-
initializeBulkConfig
private void initializeBulkConfig(Configuration.Builder builder)
-
initializePipelineConfig
private void initializePipelineConfig(Configuration.Builder builder)
-
initializeDatabaseConfig
private void initializeDatabaseConfig(Configuration.Builder builder)
-
initializeExceptionConfig
private void initializeExceptionConfig(Configuration.Builder builder)
-
initializePoolConfig
private void initializePoolConfig(Configuration.Builder builder)
-
initializeSecurityConfig
private void initializeSecurityConfig(Configuration.Builder builder)
-
initializeAdditionalConfig
private void initializeAdditionalConfig(Configuration.Builder builder)
-
configureHosts
private void configureHosts()
-
validateConfiguration
private void validateConfiguration()
-
validateIntegerFields
private void validateIntegerFields()
-
toBuilder
public Configuration.Builder toBuilder()
Create a Builder from current configuration. Since configuration data are final, this permit to change configuration, creating another object.- Returns:
- builder
-
acceptsUrl
public static boolean acceptsUrl(java.lang.String url)
Tell if mariadb driver accept url string. (Correspond to interface java.jdbc.Driver.acceptsURL() method)- Parameters:
url- url String- Returns:
- true if url string correspond.
-
parse
public static Configuration parse(java.lang.String url) throws java.sql.SQLException
parse connection string- Parameters:
url- connection string- Returns:
- configuration resulting object
- Throws:
java.sql.SQLException- if not supported driver or wrong connection string format.
-
parse
public static Configuration parse(java.lang.String url, java.util.Properties prop) throws java.sql.SQLException
Parse url connection string with additional properties.- Parameters:
url- connection stringprop- properties- Returns:
- UrlParser instance
- Throws:
java.sql.SQLException- if parsing exception occur
-
parseInternal
private static Configuration parseInternal(java.lang.String url, java.util.Properties properties) throws java.sql.SQLException
Parses the connection URL in order to set the UrlParser instance with all the information provided through the URL.- Parameters:
url- connection URLproperties- properties- Throws:
java.sql.SQLException- if format is incorrect
-
validateUrlFormat
private static void validateUrlFormat(java.lang.String url)
-
skipComplexAddresses
private static int skipComplexAddresses(java.lang.String urlSecondPart)
-
processDatabaseAndParameters
private static void processDatabaseAndParameters(java.lang.String additionalParameters, Configuration.Builder builder, java.util.Properties properties)
-
extractDatabase
private static java.lang.String extractDatabase(java.lang.String additionalParameters, int optIndex)
-
processUrlParameters
private static void processUrlParameters(java.lang.String urlParameters, java.util.Properties properties)
-
mapPropertiesToOption
private static void mapPropertiesToOption(Configuration.Builder builder, java.util.Properties properties)
-
processProperties
private static void processProperties(Configuration.Builder builder, java.util.Properties properties, java.util.Properties nonMappedOptions) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
getRealKey
private static java.lang.String getRealKey(java.lang.String key)
-
processProperty
private static void processProperty(Configuration.Builder builder, java.lang.String realKey, java.lang.Object propertyValue, java.lang.Object originalKey, java.util.Properties nonMappedOptions) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
setFieldValue
private static void setFieldValue(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object propertyValue, java.lang.Object originalKey) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
handleStringField
private static void handleStringField(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object value) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
handleBooleanField
private static void handleBooleanField(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object value, java.lang.Object originalKey) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
handleIntegerField
private static void handleIntegerField(Configuration.Builder builder, java.lang.reflect.Field field, java.lang.Object value, java.lang.Object originalKey) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
handleLegacySslSettings
private static void handleLegacySslSettings(Configuration.Builder builder, java.util.Properties nonMappedOptions)
-
isSet
private static boolean isSet(java.lang.String key, java.util.Properties nonMappedOptions)
-
parseHaMode
private static HaMode parseHaMode(java.lang.String url, int separator)
-
toConf
public static java.lang.String toConf(java.lang.String url) throws java.sql.SQLExceptionPermit to have string information on how string is parsed. example : Configuration.toConf("jdbc:mariadb://localhost/test") will return a String containing:Configuration: * resulting Url : jdbc:mariadb://localhost/test Unknown options : None Non default options : * database : test default options : * user : null ...- Parameters:
url- url string- Returns:
- string describing the configuration parsed from url
- Throws:
java.sql.SQLException- if parsing fails
-
appendBasicConfiguration
private static void appendBasicConfiguration(java.lang.StringBuilder sb, Configuration conf)
-
appendUnknownOptions
private static void appendUnknownOptions(java.lang.StringBuilder sb, Configuration conf)
-
appendNonDefaultOptions
private static void appendNonDefaultOptions(java.lang.StringBuilder sb, Configuration conf, Configuration defaultConf)
-
appendDefaultOptions
private static void appendDefaultOptions(java.lang.StringBuilder sb, Configuration conf, Configuration defaultConf)
-
processFields
private static void processFields(Configuration conf, Configuration defaultConf, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
processField
private static void processField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)
-
appendNullField
private static void appendNullField(java.lang.reflect.Field field, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)
-
appendHaModeField
private static void appendHaModeField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)
-
appendSimpleField
private static void appendSimpleField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)
-
appendListField
private static void appendListField(java.lang.reflect.Field field, java.lang.Object fieldValue, java.lang.Object defaultValue, java.lang.StringBuilder defaultOpts, java.lang.StringBuilder diffOpts)
-
buildUrl
protected static java.lang.String buildUrl(Configuration conf, boolean hideSensitive)
Builds a JDBC URL from the provided configuration.Redaction is a rendering choice, not a property of the url: a redacted url cannot be parsed back into a working configuration, so it must only be used for display. The configuration's own url is built unredacted, otherwise credentials that have no dedicated field would vanish from the value
equals(Object)compares, and two configurations differing only by an AWS IAMsecretKeyor a PAMpassword2would share a connection pool.- Parameters:
conf- Current configurationhideSensitive- replace every credential value by***- Returns:
- Complete JDBC URL string
-
appendHostAddresses
private static void appendHostAddresses(java.lang.StringBuilder sb, Configuration conf)
-
appendHostAddress
private static void appendHostAddress(java.lang.StringBuilder sb, Configuration conf, HostAddress hostAddress, int index)
-
shouldUseSimpleHostFormat
private static boolean shouldUseSimpleHostFormat(Configuration conf, HostAddress hostAddress, int index)
-
appendDatabase
private static void appendDatabase(java.lang.StringBuilder sb, Configuration conf)
-
appendHaModeIfPresent
private static void appendHaModeIfPresent(java.lang.StringBuilder sb, Configuration conf)
-
appendConfigurationParameters
private static void appendConfigurationParameters(java.lang.StringBuilder sb, Configuration conf, boolean hideSensitive)
-
appendFieldParameter
private static void appendFieldParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf, boolean hideSensitive) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
appendStringParameter
private static void appendStringParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
appendBooleanParameter
private static void appendBooleanParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
appendIntParameter
private static void appendIntParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf)
-
appendPropertiesParameter
private static void appendPropertiesParameter(Configuration.ParameterAppender appender, java.util.Properties props, boolean hideSensitive)
-
isSensitiveOption
private static boolean isSensitiveOption(java.lang.String key)
A credential that has no dedicated field is kept in nonMappedOptions, e.g. the AWS IAMsecretKeyor the PAMpassword2/password3steps. Mask those values the same waySECURE_FIELDSmasks the declared password fields, so a serialized url does not expose them.- Parameters:
key- option name- Returns:
- true if the option value must be redacted
-
appendCatalogTermParameter
private static void appendCatalogTermParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
appendCredentialPluginParameter
private static void appendCredentialPluginParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
appendDefaultParameter
private static void appendDefaultParameter(Configuration.ParameterAppender appender, java.lang.reflect.Field field, java.lang.Object value, Configuration defaultConf) throws java.lang.IllegalAccessException
- Throws:
java.lang.IllegalAccessException
-
nullOrEmpty
private static java.lang.String nullOrEmpty(java.lang.String val)
-
clone
public Configuration clone(java.lang.String username, java.lang.String password)
Clone configuration with another user/password- Parameters:
username- new usernamepassword- new password- Returns:
- new cloned configuration object
-
havePrimaryHostOnly
public boolean havePrimaryHostOnly()
-
database
public java.lang.String database()
Connection default database- Returns:
- database
-
addresses
public java.util.List<HostAddress> addresses()
addresses- Returns:
- addresses
-
haMode
public HaMode haMode()
High availability mode- Returns:
- configuration HA mode
-
credentialPlugin
public CredentialPlugin credentialPlugin()
credential plugin to use- Returns:
- credential plugin to use, null of none
-
user
public java.lang.String user()
configuration user- Returns:
- user
-
password
public java.lang.String password()
configuration password- Returns:
- password
-
initialUrl
protected java.lang.String initialUrl()
Configuration generated URL depending on current configuration option.- Returns:
- generated url
-
serverSslCert
public java.lang.String serverSslCert()
server ssl certificate (file path / certificat content)- Returns:
- server ssl certificate
-
keyStore
public java.lang.String keyStore()
key store- Returns:
- key store
-
trustStore
public java.lang.String trustStore()
trust store- Returns:
- trust store
-
keyStorePassword
public java.lang.String keyStorePassword()
key store password- Returns:
- key store password
-
trustStorePassword
public java.lang.String trustStorePassword()
trust store password- Returns:
- trust store password
-
keyPassword
public java.lang.String keyPassword()
key store alias password- Returns:
- key store alias password
-
keyStoreType
public java.lang.String keyStoreType()
key store type (to replace default javax.net.ssl.keyStoreType system property)- Returns:
- key store type
-
trustStoreType
public java.lang.String trustStoreType()
trust store type (to replace default javax.net.ssl.keyStoreType system property)- Returns:
- trust store type
-
enabledSslProtocolSuites
public java.lang.String enabledSslProtocolSuites()
permitted ssl protocol list (comma separated)- Returns:
- enabled ssl protocol list
-
credentialType
public java.lang.String credentialType()
-
fallbackToSystemKeyStore
public boolean fallbackToSystemKeyStore()
Indicate if keyStore option is not set to use keystore system property like "javax.net.ssl.keyStore"- Returns:
- true if can use keystore system property
-
fallbackToSystemTrustStore
public boolean fallbackToSystemTrustStore()
Indicate if system default truststore implementation can be used- Returns:
- true if system default truststore implementation can be used
-
socketFactory
public java.lang.String socketFactory()
Socket factory class name- Returns:
- socket factory
-
connectTimeout
public int connectTimeout()
socket connect timeout- Returns:
- connect timeout
-
pipe
public java.lang.String pipe()
Pipe path- Returns:
- pipe value
-
localSocket
public java.lang.String localSocket()
local socket configuration- Returns:
- local socket path
-
tcpKeepAlive
public boolean tcpKeepAlive()
socket tcp keep alive- Returns:
- socket tcp keep alive value
-
uuidAsString
public boolean uuidAsString()
must uuid fields return as String and not java.util.UUID- Returns:
- must UUID return as String and not uuid
-
tcpKeepIdle
public int tcpKeepIdle()
socket tcp keep idle (java 11+ only)- Returns:
- socket tcp keep idle
-
tcpKeepCount
public int tcpKeepCount()
socket tcp keep count (java 11+ only)- Returns:
- socket tcp keep count
-
tcpKeepInterval
public int tcpKeepInterval()
socket tcp keep interval (java 11+ only)- Returns:
- socket tcp keep interval
-
tcpAbortiveClose
public boolean tcpAbortiveClose()
close using TCP abortive close (RST TCP packet, in place or FIN packet)- Returns:
- close using TCP abortive close
-
localSocketAddress
public java.lang.String localSocketAddress()
local socket address path- Returns:
- local socket address
-
socketTimeout
public int socketTimeout()
socket timeout- Returns:
- socket timeout
-
allowMultiQueries
public boolean allowMultiQueries()
permit using multi queries command- Returns:
- permit using multi queries command
-
allowLocalInfile
public boolean allowLocalInfile()
permits LOAD LOCAL INFILE commands- Returns:
- allow LOAD LOCAL INFILE
-
useCompression
public boolean useCompression()
Enable compression if server has compression capability- Returns:
- use compression
-
blankTableNameMeta
public boolean blankTableNameMeta()
force returning blank table metadata (for old oracle compatibility)- Returns:
- metadata table return blank
-
disconnectOnExpiredPasswords
public boolean disconnectOnExpiredPasswords()
On connection creation, indicate behavior when password is expired. When true (default) throw an expired password error When false, connection succeed in "sandbox" mode, only queries related to password change are allowed- Returns:
- must connection fails on expired password
-
sslMode
public SslMode sslMode()
SSl mode- Returns:
- ssl mode
-
transactionIsolation
public TransactionIsolation transactionIsolation()
Default transaction isolation- Returns:
- default transaction isolation.
-
metaExportedKeys
public MetaExportedKeys metaExportedKeys()
Default metadata getExportedKeys implementation.- Returns:
- default implementation
-
enabledSslCipherSuites
public java.lang.String enabledSslCipherSuites()
autorized cipher list.- Returns:
- list of permitted ciphers
-
sessionVariables
public java.lang.String sessionVariables()
coma separated Session variable list- Returns:
- session variable
-
tinyInt1isBit
public boolean tinyInt1isBit()
Must tinyint(1) be considered as Bit- Returns:
- true if tinyint(1) must be considered as Bit
-
transformedBitIsBoolean
public boolean transformedBitIsBoolean()
Must tinyint(1) be considered as Boolean or Bit- Returns:
- true if tinyint(1) must be considered as Boolean
-
yearIsDateType
public boolean yearIsDateType()
Must year be return by default as Date in result-set- Returns:
- year is Date type
-
timezone
public java.lang.String timezone()
Set timezone- Returns:
- timezone
-
connectionTimeZone
public java.lang.String connectionTimeZone()
Set connectionTimeZone- Returns:
- connectionTimeZone
-
connectionCollation
public java.lang.String connectionCollation()
get connectionCollation- Returns:
- connectionCollation
-
forceConnectionTimeZoneToSession
public java.lang.Boolean forceConnectionTimeZoneToSession()
forceConnectionTimeZoneToSession must connection timezone be forced- Returns:
- forceConnectionTimeZoneToSession
-
preserveInstants
public boolean preserveInstants()
Must timezone change preserve instants- Returns:
- true if instants must be preserved
-
pureLocalDateTime
public boolean pureLocalDateTime()
Whether LocalDateTime is handled as a pure zoneless wall-clock value (default true), matching SQL DATETIME semantics. When set tofalse,preserveInstantsalso converts LocalDateTime between the connection time zone and the JVM default.- Returns:
- true if LocalDateTime is treated as a pure zoneless value
-
dumpQueriesOnException
public boolean dumpQueriesOnException()
Must query by logged on exception.- Returns:
- dump queries on exception
-
prepStmtCacheSize
public int prepStmtCacheSize()
Prepare statement cache size.- Returns:
- Prepare statement cache size
-
useAffectedRows
public boolean useAffectedRows()
Use affected row- Returns:
- use affected rows
-
rewriteBatchedStatements
public boolean rewriteBatchedStatements()
-
useServerPrepStmts
public boolean useServerPrepStmts()
Use server prepared statement. IF false, using client prepared statement.- Returns:
- use server prepared statement
-
connectionAttributes
public java.lang.String connectionAttributes()
Connections attributes- Returns:
- connection meta informations
-
useBulkStmts
public boolean useBulkStmts()
Use server COM_STMT_BULK for batching.- Returns:
- use server bulk command.
-
useBulkStmtsForInserts
public boolean useBulkStmtsForInserts()
Use server COM_STMT_BULK for batching inserts. if useBulkStmts is enabled, useBulkStmtsForInserts will be as well- Returns:
- use server bulk command for inserts
-
disablePipeline
public boolean disablePipeline()
Disable pipeline.- Returns:
- is pipeline disabled.
-
autocommit
public java.lang.Boolean autocommit()
Force session autocommit on connection creation- Returns:
- autocommit forced value
-
useMysqlMetadata
public boolean useMysqlMetadata()
Force returning MySQL metadata information- Returns:
- force returning MySQL in metadata
-
nullDatabaseMeansCurrent
public boolean nullDatabaseMeansCurrent()
When enable, in DatabaseMetadata, will handle null database/schema (depending on UseCatalog=catalog/schema) as current- Returns:
- must null value be considered as current catalog/schema
-
useCatalogTerm
public CatalogTerm useCatalogTerm()
Indicating using Catalog or Schema- Returns:
- Indicating using Catalog or Schema
-
createDatabaseIfNotExist
public boolean createDatabaseIfNotExist()
create database if not exist- Returns:
- create database if not exist
-
useLocalSessionState
public boolean useLocalSessionState()
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- Returns:
- can use local state
-
readOnlyPropagatesToServer
public boolean readOnlyPropagatesToServer()
When enabled (the default),Connection.setReadOnly(boolean)on a single-host connection propagates the read-only state to the server by issuingSET SESSION TRANSACTION READ ONLY/READ WRITE, for servers >= 5.6.5. This lets the server (and engines that can use it) reject DML on a read-only connection and take an optimistic read-only transaction path. Multi-host replica connections are already put in read-only mode at connection time, so this option does not change their behavior. When disabled,setReadOnly()sends no statement on a single-host connection.- Returns:
- true if
setReadOnly()propagates the read-only state to the server
-
returnMultiValuesGeneratedIds
public boolean returnMultiValuesGeneratedIds()
Returns multi-values generated ids. For mariadb 2.x connector compatibility- Returns:
- must returns multi-values generated ids.
-
jdbcCompliantTruncation
public boolean jdbcCompliantTruncation()
Force sql_mode to strict mode for JDBC compliance- Returns:
- must force jdbc compliance
-
oldModeNoPrecisionTimestamp
public boolean oldModeNoPrecisionTimestamp()
Force Timestamp string representation compatible to 2.7 version Timestamp string representation will then correspond to Timestamp.toString() in place of taking field precision- Returns:
- force 2.7 timestamp to string behavior
-
permitRedirect
public java.lang.Boolean permitRedirect()
must client redirect when required- Returns:
- must client redirect when required
-
pinGlobalTxToPhysicalConnection
public boolean pinGlobalTxToPhysicalConnection()
When enabled, ensure that for XA operation to use the same connection- Returns:
- pinGlobalTxToPhysicalConnection
-
permitNoResults
public boolean permitNoResults()
Indicate if Statement/PreparedStatement.executeQuery for command that produce no result will return an exception or just an empty result-setWhen enabled, command not returning no data will end returning an empty result-set When disabled, command not returning no data will end throwing an exception
- Returns:
- permitNoResults
-
includeInnodbStatusInDeadlockExceptions
public boolean includeInnodbStatusInDeadlockExceptions()
On deadlock exception, must driver execute additional commands to show innodb status in error description.- Returns:
- includeInnodbStatusInDeadlockExceptions
-
includeThreadDumpInDeadlockExceptions
public boolean includeThreadDumpInDeadlockExceptions()
On deadlock exception, must driver display threads information on error description.- Returns:
- include Thread Dump In Deadlock Exceptions
-
servicePrincipalName
public java.lang.String servicePrincipalName()
Service principal name (GSSAPI option)- Returns:
- service principal name
-
defaultFetchSize
public int defaultFetchSize()
result-set streaming default fetch size- Returns:
- Default fetch size.
-
nonMappedOptions
public java.util.Properties nonMappedOptions()
non standard options- Returns:
- non standard options
-
tlsSocketType
public java.lang.String tlsSocketType()
TLS socket type- Returns:
- TLS socket type
-
maxQuerySizeToLog
public int maxQuerySizeToLog()
query maximum size to log (query will be truncated of more than this limit)- Returns:
- max query log size
-
maxAllowedPacket
public java.lang.Integer maxAllowedPacket()
Maximum size (in bytes) of a packet the driver will send or receive. When set, this value is advertised to the server during the handshake, used to reject a command whose size would exceed it, and used to reject an oversized packet received from the server. Whennull, no client-side limit is enforced on the send side, and the receive side falls back to a server-independent heap-relative ceiling (a quarter of the JVM max heap, clamped between 16Mb and 1Gb).- Returns:
- max_allowed_packet value
-
maxAllowedColumns
public int maxAllowedColumns()
Maximum number of columns the driver will accept in a result-set or prepare metadata received from the server. Reading column metadata allocates memory proportional to the announced column count, so a malicious proxy announcing a huge count could exhaust client memory. When the server announces more columns than this limit, the command is interrupted with an error. Defaults to 65535.- Returns:
- maximum allowed number of columns
-
retriesAllDown
public int retriesAllDown()
retry the maximum retry number of attempts to reconnect after a failover.- Returns:
- the maximum retry number of attempts to reconnect after a failover.
-
galeraAllowedState
public java.lang.String galeraAllowedState()
Galera comma separated allowed state- Returns:
- galera allowed state
-
pool
public boolean pool()
Create pool- Returns:
- create pool if don't exists
-
poolName
public java.lang.String poolName()
pool name- Returns:
- pool name.
-
maxPoolSize
public int maxPoolSize()
max pool size- Returns:
- maximum pool size
-
minPoolSize
public int minPoolSize()
Minimum pool size- Returns:
- minimum pool size
-
maxIdleTime
public int maxIdleTime()
Max idle time- Returns:
- pool max idle time.
-
registerJmxPool
public boolean registerJmxPool()
register pool information to JMX- Returns:
- register pool to JMX
-
poolValidMinDelay
public int poolValidMinDelay()
Pool mininum validation delay.- Returns:
- pool validation delay
-
useResetConnection
public boolean useResetConnection()
Must connection returned to pool be RESET- Returns:
- use RESET on connection
-
serverRsaPublicKeyFile
public java.lang.String serverRsaPublicKeyFile()
Server RSA public key file for caching_sha2_password authentication- Returns:
- server key file
-
allowPublicKeyRetrieval
public boolean allowPublicKeyRetrieval()
permit mysql authentication to retrieve server certificate- Returns:
- is driver allowed to retrieve server certificate from server
-
useReadAheadInput
public boolean useReadAheadInput()
Read all data from socket in advance- Returns:
- use read ahead buffer implementation
-
cachePrepStmts
public boolean cachePrepStmts()
Cache prepared statement result.- Returns:
- cache prepare results
-
transactionReplay
public boolean transactionReplay()
implements transaction replay failover- Returns:
- true if transaction must be replayed on failover.
-
transactionReplaySize
public int transactionReplaySize()
transaction replay maximum number of saved command.- Returns:
- transaction replay buffer size.
-
useIpForKillQuery
public boolean useIpForKillQuery()
WhetherConnection.cancelCurrentQuery()should reuse the current socket IP instead of the original hostname when opening the kill connection. Defaultfalse.- Returns:
- true to reuse the socket IP, false to keep the original hostname.
-
geometryDefaultType
public java.lang.String geometryDefaultType()
geometry default decoding implementation- Returns:
- geometry default type
-
restrictedAuth
public java.lang.String restrictedAuth()
Restrict authentication plugin to comma separated plugin list- Returns:
- authorized authentication list
-
initSql
public java.lang.String initSql()
Execute initial command when connection is established- Returns:
- initial SQL command
-
codecs
public Codec<?>[] codecs()
datatype Encoder/decoder list- Returns:
- codec list
-
toString
public java.lang.String toString()
ToString implementation.- Overrides:
toStringin classjava.lang.Object- Returns:
- String value
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
loadCodecs
private void loadCodecs()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-