org.mariadb.jdbc.internal.util
Enum DefaultOptions

java.lang.Object
  extended by java.lang.Enum<DefaultOptions>
      extended by org.mariadb.jdbc.internal.util.DefaultOptions
All Implemented Interfaces:
Serializable, Comparable<DefaultOptions>

public enum DefaultOptions
extends Enum<DefaultOptions>


Enum Constant Summary
ALLOW_LOCAL_INFILE
          If set to 'false', exception thrown during LOCAL INFILE if no InputStream has already been set.
ALLOW_MULTI_QUERIES
          Allows multiple statements in single executeQuery.
ASSUREREADONLY
          when in high availability, and switching to a read-only host, assure that this host is in read-only mode by setting session read-only.
AUTO_RECONNECT
          Driver must recreateConnection after a failover.
CACHE_CALLABLE_STMTS
          enable/disable callable Statement cache, default true.
CACHEPREPSTMTS
          enable/disable prepare Statement cache, default true.
CALLABLE_STMT_CACHE_SIZE
          This sets the number of callable statements that the driver will cache per VM if "cacheCallableStmts" is enabled.
CLIENT_CERTIFICATE_KEYSTORE_PASSWORD
          Password for the client certificate keystore (similar to java System property "javax.net.ssl.keyStorePassword").
CLIENT_CERTIFICATE_KEYSTORE_URL
          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).
CONNECT_TIMEOUT
           
CONNECTION_ATTRIBUTES
          Indicate to server some client information in a key;value pair.
CONTINUE_BATCH_ON_ERROR
          When executing batch queries, must batch continue on error.
CREATE_DATABASE_IF_NOT_EXISTS
          The database precised in url will be created if doesn't exist.
DUMP_QUERY_ON_EXCEPTION
          If set to 'true', exception thrown during query execution contain query string.
ENABLE_PACKET_DEBUG
          Driver will save the last 16 MySQL packet exchanges (limited to first 1000 bytes).
ENABLED_SSL_CIPHER_SUITES
          Force TLS/SSL cipher.
ENABLED_SSL_PROTOCOL_SUITES
          Force TLS/SSL protocol to a specific set of TLS versions (comma separated list) example : "TLSv1, TLSv1.1, TLSv1.2"
FAIL_ON_READ_ONLY
          After a master failover and no other master found, back on a read-only host ( throw exception if not).
FAILOVER_LOOP_RETRIES
          When using failover, the number of times the driver should cycle silently through available hosts, attempting to connect.
INTERACTIVE_CLIENT
          Session timeout is defined by the wait_timeout server variable.
JDBCOMPLIANTRUNCATION
          Truncation error ("Data truncated for column '%' at row %", "Out of range value for column '%' at row %") will be thrown as error, and not as warning.
KILL_FETCH_STMT
          When closing a statement that is fetching result-set (using setFetchSize), kill query to avoid having to read remaining rows.
LOAD_BALANCE_BLACKLIST_TIMEOUT
          time in second a server is blacklisted after a connection failure.
LOCAL_SOCKET
          Allows to connect to database via Unix domain socket, if server allows it.
LOCAL_SOCKET_ADDRESS
          Hostname or IP address to bind the connection socket to a local (UNIX domain) socket.
LOGGING
          Enable log information. require Slf4j version > 1.4 dependency.
MAX_QUERY_LOG_SIZE
          Max query log size.
MAXIMIZEMYSQLCOMPATIBILITY
          maximize Mysql compatibility.
NULL_CATALOG_MEANS_CURRENT
          DatabaseMetaData use current catalog if null.
PASSWORD
          Password of database user.
PASSWORD_CHARACTER_ENCODING
          Indicate password encoding charset.
PIN_GLOBAL_TX_TO_PHYSICAL_CONNECTION
           
PIPE
          On Windows, specify named pipe name to connect to mysqld.exe.
PIPELINE_AUTH
          Fast connection creation (recommended if not using authentication plugins) default to true.
PREPSTMTCACHESIZE
          This sets the number of prepared statements that the driver will cache per VM if "cachePrepStmts" is enabled.
PREPSTMTCACHESQLLIMIT
          This is the maximum length of a prepared SQL statement that the driver will cache if "cachePrepStmts" is enabled.
PRIVATE_KEYS_PASSWORD
          Password for the private key contain in client certificate keystore.
PROFILESQL
          log query execution time.
RETRY_ALL_DOWN
          When using loadbalancing, the number of times the driver should cycle through available hosts, attempting to connect.
REWRITE_BATCHED_STATEMENTS
          rewrite batchedStatement to have only one server call.
SERVER_SSL_CERT
          Server's certificate in DER form, or server's CA certificate.
SERVER_TIMEZONE
          Defined the server time zone.
SESSION_VARIABLES
          var=value pairs separated by comma, mysql session variables, set upon establishing successful connection.
SHARED_MEMORY
          Allowed to connect database via shared memory, if server allows it.
SLOW_QUERY_TIME
          Will log query with execution time superior to this value (if defined ) default to null.
SOCKET_FACTORY
          to use custom socket factory, set it to full name of the class that implements javax.net.SocketFactory.
SOCKET_TIMEOUT
          Defined the network socket timeout (SO_TIMEOUT) in milliseconds. 0 (default) disable this timeout
TCP_ABORTIVE_CLOSE
          Sets corresponding option on the connection socket.
TCP_KEEP_ALIVE
          Sets corresponding option on the connection socket.
TCP_NO_DELAY
          Sets corresponding option on the connection socket.
TCP_RCV_BUF
          set buffer size for TCP buffer (SO_RCVBUF).
TCP_SND_BUF
          set buffer size for TCP buffer (SO_SNDBUF).
TINY_INT_IS_BIT
          Datatype mapping flag, handle MySQL Tiny as BIT(boolean).
TRUST_CERTIFICATE_KEYSTORE_PASSWORD
          Password for the trusted root certificate file (similar to java System property "javax.net.ssl.trustStorePassword").
TRUST_CERTIFICATE_KEYSTORE_URL
          File path of the trustStore file (similar to java System property "javax.net.ssl.trustStore").
TRUST_SERVER_CERTIFICATE
          When using SSL, do not check server's certificate.
USE_BATCH_MULTI_SEND
          PreparedStatement.executeBatch() will send many QUERY before reading result packets.
USE_BATCH_MULTI_SEND_NUMBER
          When using useBatchMultiSend, indicate maximum query that can be send at a time.
USE_FRACTIONAL_SECONDS
          Correctly handle subsecond precision in timestamps (feature available with MariaDB 5.3 and later).
USE_OLD_ALIAS_METADATA_BEHAVIOR
          Metadata ResultSetMetaData.getTableName() return the physical table name.
USE_SSL
          Force SSL on connection.
USELEGACYDATETIMECODE
          if true (default) store date/timestamps according to client time zone.
USER
          Database user name.
USER_COMPRESSION
          allow compression in MySQL Protocol.
USESERVERPREPSTMTS
          useServerPrepStmts must prepared statements be prepared on server side, or just faked on client side.
VALID_CONNECTION_TIMEOUT
          When in multiple hosts, after this time in second without used, verification that the connections haven't been lost.
YEAR_IS_DATE_TYPE
          Year is date type, rather than numerical.
 
Field Summary
protected  Object defaultValue
           
protected  String implementationVersion
           
protected  Object maxValue
           
protected  Object minValue
           
protected  String name
           
protected  Object objType
           
protected  Object value
           
 
Method Summary
static Options defaultValues(HaMode haMode)
           
static Options parse(HaMode haMode, String urlParameters, Options options)
           
static Options parse(HaMode haMode, String urlParameters, Properties properties)
           
static Options parse(HaMode haMode, String urlParameters, Properties properties, Options options)
          Parse additional properties .
static DefaultOptions valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DefaultOptions[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

USER

public static final DefaultOptions USER
Database user name.


PASSWORD

public static final DefaultOptions PASSWORD
Password of database user.


CONNECT_TIMEOUT

public static final DefaultOptions CONNECT_TIMEOUT

PIPE

public static final DefaultOptions PIPE
On Windows, specify named pipe name to connect to mysqld.exe.


LOCAL_SOCKET

public static final DefaultOptions LOCAL_SOCKET
Allows to connect to database via Unix domain socket, if server allows it. The value is the path of Unix domain socket, i.e "socket" database parameter.


SHARED_MEMORY

public static final DefaultOptions SHARED_MEMORY
Allowed to connect database via shared memory, if server allows it. The value is base name of the shared memory.


TCP_NO_DELAY

public static final DefaultOptions TCP_NO_DELAY
Sets corresponding option on the connection socket.


TCP_ABORTIVE_CLOSE

public static final DefaultOptions TCP_ABORTIVE_CLOSE
Sets corresponding option on the connection socket.


LOCAL_SOCKET_ADDRESS

public static final DefaultOptions LOCAL_SOCKET_ADDRESS
Hostname or IP address to bind the connection socket to a local (UNIX domain) socket.


SOCKET_TIMEOUT

public static final DefaultOptions SOCKET_TIMEOUT
Defined the network socket timeout (SO_TIMEOUT) in milliseconds. 0 (default) disable this timeout


INTERACTIVE_CLIENT

public static final DefaultOptions INTERACTIVE_CLIENT
Session timeout is defined by the wait_timeout server variable. Setting interactiveClient to true will tell server to use the interactive_timeout server variable


DUMP_QUERY_ON_EXCEPTION

public static final DefaultOptions DUMP_QUERY_ON_EXCEPTION
If set to 'true', exception thrown during query execution contain query string.


USE_OLD_ALIAS_METADATA_BEHAVIOR

public static final DefaultOptions USE_OLD_ALIAS_METADATA_BEHAVIOR
Metadata ResultSetMetaData.getTableName() return the physical table name. "useOldAliasMetadataBehavior" permit to activate the legacy code that send the table alias if set.


ALLOW_LOCAL_INFILE

public static final DefaultOptions ALLOW_LOCAL_INFILE
If set to 'false', exception thrown during LOCAL INFILE if no InputStream has already been set.


SESSION_VARIABLES

public static final DefaultOptions SESSION_VARIABLES
var=value pairs separated by comma, mysql session variables, set upon establishing successful connection.


CREATE_DATABASE_IF_NOT_EXISTS

public static final DefaultOptions CREATE_DATABASE_IF_NOT_EXISTS
The database precised in url will be created if doesn't exist. (legacy alias "createDB")


SERVER_TIMEZONE

public static final DefaultOptions SERVER_TIMEZONE
Defined the server time zone. to use only if jre server as a different time implementation of the server. (best to have the same server time zone when possible)


NULL_CATALOG_MEANS_CURRENT

public static final DefaultOptions NULL_CATALOG_MEANS_CURRENT
DatabaseMetaData use current catalog if null.


TINY_INT_IS_BIT

public static final DefaultOptions TINY_INT_IS_BIT
Datatype mapping flag, handle MySQL Tiny as BIT(boolean).


YEAR_IS_DATE_TYPE

public static final DefaultOptions YEAR_IS_DATE_TYPE
Year is date type, rather than numerical.


USE_SSL

public static final DefaultOptions USE_SSL
Force SSL on connection. (legacy alias "useSSL")


USER_COMPRESSION

public static final DefaultOptions USER_COMPRESSION
allow compression in MySQL Protocol.


ALLOW_MULTI_QUERIES

public static final DefaultOptions ALLOW_MULTI_QUERIES
Allows multiple statements in single executeQuery.


REWRITE_BATCHED_STATEMENTS

public static final DefaultOptions REWRITE_BATCHED_STATEMENTS
rewrite batchedStatement to have only one server call.


TCP_KEEP_ALIVE

public static final DefaultOptions TCP_KEEP_ALIVE
Sets corresponding option on the connection socket. Defaults to true since 1.6.0 (false before)


TCP_RCV_BUF

public static final DefaultOptions TCP_RCV_BUF
set buffer size for TCP buffer (SO_RCVBUF).


TCP_SND_BUF

public static final DefaultOptions TCP_SND_BUF
set buffer size for TCP buffer (SO_SNDBUF).


SOCKET_FACTORY

public static final DefaultOptions SOCKET_FACTORY
to use custom socket factory, set it to full name of the class that implements javax.net.SocketFactory.


PIN_GLOBAL_TX_TO_PHYSICAL_CONNECTION

public static final DefaultOptions PIN_GLOBAL_TX_TO_PHYSICAL_CONNECTION

TRUST_SERVER_CERTIFICATE

public static final DefaultOptions TRUST_SERVER_CERTIFICATE
When using SSL, do not check server's certificate.


SERVER_SSL_CERT

public static final DefaultOptions SERVER_SSL_CERT
Server's certificate in DER form, or server's CA certificate. Can be used in one of 3 forms, sslServerCert=/path/to/cert.pem (full path to certificate), sslServerCert=classpath:relative/cert.pem (relative to current classpath), or as verbatim DER-encoded certificate string "-----BEGIN CERTIFICATE-----".


USE_FRACTIONAL_SECONDS

public static final DefaultOptions USE_FRACTIONAL_SECONDS
Correctly handle subsecond precision in timestamps (feature available with MariaDB 5.3 and later). May confuse 3rd party components (Hibernated).


AUTO_RECONNECT

public static final DefaultOptions AUTO_RECONNECT
Driver must recreateConnection after a failover.


FAIL_ON_READ_ONLY

public static final DefaultOptions FAIL_ON_READ_ONLY
After a master failover and no other master found, back on a read-only host ( throw exception if not).


RETRY_ALL_DOWN

public static final DefaultOptions RETRY_ALL_DOWN
When using loadbalancing, the number of times the driver should cycle through available hosts, attempting to connect. Between cycles, the driver will pause for 250ms if no servers are available.


FAILOVER_LOOP_RETRIES

public static final DefaultOptions FAILOVER_LOOP_RETRIES
When using failover, the number of times the driver should cycle silently through available hosts, attempting to connect. Between cycles, the driver will pause for 250ms if no servers are available. if set to 0, there will be no silent reconnection


VALID_CONNECTION_TIMEOUT

public static final DefaultOptions VALID_CONNECTION_TIMEOUT
When in multiple hosts, after this time in second without used, verification that the connections haven't been lost. When 0, no verification will be done. Defaults to 0 (120 before 1.5.8 version)


LOAD_BALANCE_BLACKLIST_TIMEOUT

public static final DefaultOptions LOAD_BALANCE_BLACKLIST_TIMEOUT
time in second a server is blacklisted after a connection failure. default to 50s


CACHEPREPSTMTS

public static final DefaultOptions CACHEPREPSTMTS
enable/disable prepare Statement cache, default true.


PREPSTMTCACHESIZE

public static final DefaultOptions PREPSTMTCACHESIZE
This sets the number of prepared statements that the driver will cache per VM if "cachePrepStmts" is enabled. default to 250.


PREPSTMTCACHESQLLIMIT

public static final DefaultOptions PREPSTMTCACHESQLLIMIT
This is the maximum length of a prepared SQL statement that the driver will cache if "cachePrepStmts" is enabled. default to 2048.


ASSUREREADONLY

public static final DefaultOptions ASSUREREADONLY
when in high availability, and switching to a read-only host, assure that this host is in read-only mode by setting session read-only. default to false


USELEGACYDATETIMECODE

public static final DefaultOptions USELEGACYDATETIMECODE
if true (default) store date/timestamps according to client time zone. if false, store all date/timestamps in DB according to server time zone, and time information (that is a time difference), doesn't take timezone in account.


MAXIMIZEMYSQLCOMPATIBILITY

public static final DefaultOptions MAXIMIZEMYSQLCOMPATIBILITY
maximize Mysql compatibility. when using jdbc setDate(), will store date in client timezone, not in server timezone when useLegacyDatetimeCode = false. default to false.


USESERVERPREPSTMTS

public static final DefaultOptions USESERVERPREPSTMTS
useServerPrepStmts must prepared statements be prepared on server side, or just faked on client side. if rewriteBatchedStatements is set to true, this options will be set to false. default to false.


TRUST_CERTIFICATE_KEYSTORE_URL

public static final DefaultOptions TRUST_CERTIFICATE_KEYSTORE_URL
File path of the trustStore file (similar to java System property "javax.net.ssl.trustStore"). Use the specified keystore for trusted root certificates. When set, overrides serverSslCert.

(legacy alias trustCertificateKeyStoreUrl)


TRUST_CERTIFICATE_KEYSTORE_PASSWORD

public static final DefaultOptions TRUST_CERTIFICATE_KEYSTORE_PASSWORD
Password for the trusted root certificate file (similar to java System property "javax.net.ssl.trustStorePassword").

(legacy alias trustCertificateKeyStorePassword)


CLIENT_CERTIFICATE_KEYSTORE_URL

public static final DefaultOptions CLIENT_CERTIFICATE_KEYSTORE_URL
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). (legacy alias clientCertificateKeyStoreUrl)


CLIENT_CERTIFICATE_KEYSTORE_PASSWORD

public static final DefaultOptions CLIENT_CERTIFICATE_KEYSTORE_PASSWORD
Password for the client certificate keystore (similar to java System property "javax.net.ssl.keyStorePassword"). (legacy alias clientCertificateKeyStorePassword)


PRIVATE_KEYS_PASSWORD

public static final DefaultOptions PRIVATE_KEYS_PASSWORD
Password for the private key contain in client certificate keystore. needed only in case private key password differ from keyStore password.


ENABLED_SSL_PROTOCOL_SUITES

public static final DefaultOptions ENABLED_SSL_PROTOCOL_SUITES
Force TLS/SSL protocol to a specific set of TLS versions (comma separated list) example : "TLSv1, TLSv1.1, TLSv1.2"


ENABLED_SSL_CIPHER_SUITES

public static final DefaultOptions ENABLED_SSL_CIPHER_SUITES
Force TLS/SSL cipher. (comma separated list) example : "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384"


CONTINUE_BATCH_ON_ERROR

public static final DefaultOptions CONTINUE_BATCH_ON_ERROR
When executing batch queries, must batch continue on error. default to true.


JDBCOMPLIANTRUNCATION

public static final DefaultOptions JDBCOMPLIANTRUNCATION
Truncation error ("Data truncated for column '%' at row %", "Out of range value for column '%' at row %") will be thrown as error, and not as warning.


CACHE_CALLABLE_STMTS

public static final DefaultOptions CACHE_CALLABLE_STMTS
enable/disable callable Statement cache, default true.


CALLABLE_STMT_CACHE_SIZE

public static final DefaultOptions CALLABLE_STMT_CACHE_SIZE
This sets the number of callable statements that the driver will cache per VM if "cacheCallableStmts" is enabled. default to 150.


CONNECTION_ATTRIBUTES

public static final DefaultOptions CONNECTION_ATTRIBUTES
Indicate to server some client information in a key;value pair. for example connectionAttributes=key1:value1,key2,value2. Those information can be retrieved on server within tables mysql.session_connect_attrs and mysql.session_account_connect_attrs. This can permit from server an identification of client.


USE_BATCH_MULTI_SEND

public static final DefaultOptions USE_BATCH_MULTI_SEND
PreparedStatement.executeBatch() will send many QUERY before reading result packets. default to true. (null is considered true. this permit to know if option was explicitly set)


USE_BATCH_MULTI_SEND_NUMBER

public static final DefaultOptions USE_BATCH_MULTI_SEND_NUMBER
When using useBatchMultiSend, indicate maximum query that can be send at a time. default to 100


LOGGING

public static final DefaultOptions LOGGING
Enable log information. require Slf4j version > 1.4 dependency. log informations : - info : query log default to false.


PROFILESQL

public static final DefaultOptions PROFILESQL
log query execution time. (legacy alias alias profileSQL)


MAX_QUERY_LOG_SIZE

public static final DefaultOptions MAX_QUERY_LOG_SIZE
Max query log size. default to 1024.


SLOW_QUERY_TIME

public static final DefaultOptions SLOW_QUERY_TIME
Will log query with execution time superior to this value (if defined ) default to null.


PASSWORD_CHARACTER_ENCODING

public static final DefaultOptions PASSWORD_CHARACTER_ENCODING
Indicate password encoding charset. If not set, driver use platform's default charset. default to null.


PIPELINE_AUTH

public static final DefaultOptions PIPELINE_AUTH
Fast connection creation (recommended if not using authentication plugins) default to true. (null is considered true. this permit to know if option was explicitly set)


KILL_FETCH_STMT

public static final DefaultOptions KILL_FETCH_STMT
When closing a statement that is fetching result-set (using setFetchSize), kill query to avoid having to read remaining rows.


ENABLE_PACKET_DEBUG

public static final DefaultOptions ENABLE_PACKET_DEBUG
Driver will save the last 16 MySQL packet exchanges (limited to first 1000 bytes). Hexadecimal value of those packet will be added to stacktrace when an IOException occur. This options has no performance incidence (< 1 microseconds per query) but driver will then take 16kb more memory.

Field Detail

name

protected final String name

objType

protected final Object objType

defaultValue

protected final Object defaultValue

minValue

protected final Object minValue

maxValue

protected final Object maxValue

implementationVersion

protected final String implementationVersion

value

protected Object value
Method Detail

values

public static DefaultOptions[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DefaultOptions c : DefaultOptions.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DefaultOptions valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

defaultValues

public static Options defaultValues(HaMode haMode)

parse

public static Options parse(HaMode haMode,
                            String urlParameters,
                            Options options)

parse

public static Options parse(HaMode haMode,
                            String urlParameters,
                            Properties properties)

parse

public static Options parse(HaMode haMode,
                            String urlParameters,
                            Properties properties,
                            Options options)
Parse additional properties .

Parameters:
haMode - current haMode.
urlParameters - options defined in url
properties - options defined by properties
options - initial options
Returns:
options


Copyright © 2017. All rights reserved.