Class Configuration


  • public class Configuration
    extends Object
    parse 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

    • Method Detail

      • acceptsUrl

        public static boolean acceptsUrl​(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​(String url,
                                          Properties prop)
                                   throws SQLException
        Parse url connection string with additional properties.
        Parameters:
        url - connection string
        prop - properties
        Returns:
        UrlParser instance
        Throws:
        SQLException - if parsing exception occur
      • database

        public String database()
      • haMode

        public HaMode haMode()
      • password

        public String password()
      • initialUrl

        public String initialUrl()
      • serverSslCert

        public String serverSslCert()
      • keyStore

        public String keyStore()
      • keyStorePassword

        public String keyStorePassword()
      • keyStoreType

        public String keyStoreType()
      • enabledSslProtocolSuites

        public String enabledSslProtocolSuites()
      • socketFactory

        public String socketFactory()
      • connectTimeout

        public int connectTimeout()
      • connectTimeout

        public Configuration connectTimeout​(int connectTimeout)
      • localSocket

        public String localSocket()
      • tcpKeepAlive

        public boolean tcpKeepAlive()
      • tcpKeepIdle

        public int tcpKeepIdle()
      • tcpKeepCount

        public int tcpKeepCount()
      • tcpKeepInterval

        public int tcpKeepInterval()
      • tcpAbortiveClose

        public boolean tcpAbortiveClose()
      • localSocketAddress

        public String localSocketAddress()
      • socketTimeout

        public int socketTimeout()
      • allowMultiQueries

        public boolean allowMultiQueries()
      • allowLocalInfile

        public boolean allowLocalInfile()
      • useCompression

        public boolean useCompression()
      • blankTableNameMeta

        public boolean blankTableNameMeta()
      • sslMode

        public SslMode sslMode()
      • enabledSslCipherSuites

        public String enabledSslCipherSuites()
      • sessionVariables

        public String sessionVariables()
      • tinyInt1isBit

        public boolean tinyInt1isBit()
      • yearIsDateType

        public boolean yearIsDateType()
      • timezone

        public String timezone()
      • dumpQueriesOnException

        public boolean dumpQueriesOnException()
      • prepStmtCacheSize

        public int prepStmtCacheSize()
      • useAffectedRows

        public boolean useAffectedRows()
      • useServerPrepStmts

        public boolean useServerPrepStmts()
      • connectionAttributes

        public String connectionAttributes()
      • useBulkStmts

        public boolean useBulkStmts()
      • autocommit

        public boolean autocommit()
      • useMysqlMetadata

        public boolean useMysqlMetadata()
      • includeInnodbStatusInDeadlockExceptions

        public boolean includeInnodbStatusInDeadlockExceptions()
      • includeThreadDumpInDeadlockExceptions

        public boolean includeThreadDumpInDeadlockExceptions()
      • servicePrincipalName

        public String servicePrincipalName()
      • defaultFetchSize

        public int defaultFetchSize()
      • nonMappedOptions

        public Properties nonMappedOptions()
      • tlsSocketType

        public String tlsSocketType()
      • maxQuerySizeToLog

        public int maxQuerySizeToLog()
      • retriesAllDown

        public int retriesAllDown()
      • galeraAllowedState

        public String galeraAllowedState()
      • pool

        public boolean pool()
      • poolName

        public String poolName()
      • maxPoolSize

        public int maxPoolSize()
      • minPoolSize

        public int minPoolSize()
      • maxIdleTime

        public int maxIdleTime()
      • registerJmxPool

        public boolean registerJmxPool()
      • poolValidMinDelay

        public int poolValidMinDelay()
      • useResetConnection

        public boolean useResetConnection()
      • serverRsaPublicKeyFile

        public String serverRsaPublicKeyFile()
      • allowPublicKeyRetrieval

        public boolean allowPublicKeyRetrieval()
      • useReadAheadInput

        public boolean useReadAheadInput()
      • cachePrepStmts

        public boolean cachePrepStmts()
      • transactionReplay

        public boolean transactionReplay()
      • geometryDefaultType

        public String geometryDefaultType()
      • restrictedAuth

        public String restrictedAuth()
      • codecs

        public Codec<?>[] codecs()
      • toString

        public String toString()
        ToString implementation.
        Overrides:
        toString in class Object
        Returns:
        String value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object