public enum DefaultOptions extends Enum<DefaultOptions>
Enum Constant and Description |
---|
ALLOW_LOCAL_INFILE
If set to 'false', exception thrown during LOCAL INFILE if no InputStream has already been set.
|
ALLOW_MASTER_DOWN
On master/slave configuration, permit to connect Connection defaulting to a slave
when master is down.
|
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.
|
AUTOCOMMIT
Set default autocommit value.
|
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.
|
CONNECT_TIMEOUT
The connect timeout value, in milliseconds, or zero for no 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.
|
GALERA_ALLOWED_STATE
Usually, Connection.isValid just send an empty packet to server, and server send a small response to ensure
connectivity.
|
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.
|
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).
|
KEYSTORE_PASSWORD
Password for the client certificate keystore (similar to java System property "javax.net.ssl.keyStorePassword").
|
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_IDLE_TIME
The maximum amount of time in seconds that a connection can stay in pool when not used.
|
MAX_POOL_SIZE
The maximum number of physical connections that
the pool should contain.
|
MAX_QUERY_LOG_SIZE
Max query log size.
|
MAXIMIZEMYSQLCOMPATIBILITY
maximize Mysql compatibility.
|
MIN_POOL_SIZE
The number of physical connections the pool should keep available at all times.
|
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.
|
POOL
Enable pool.
|
POOL_NAME
Pool name that will permit to identify thread.
|
POOL_VALID_MIN_DELAY
When asking a connection to pool, Pool will validate connection state.
|
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.
|
REGISTER_POOL_JMX
Register JMX monitoring pools.
|
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
|
SSL_HOSTNAME_VERIFICATION
When using ssl, driver check hostname against the server's identity as presented in the server's Certificate
(checking alternative names or certificate CN) to prevent man-in-the-middle attack.
|
STATIC_GLOBAL
Indicate that global variable aren't changed by application, permitting to pool faster connection.
|
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_SERVER_CERTIFICATE
When using SSL, do not check server's certificate.
|
TRUSTSTORE
File path of the trustStore file (similar to java System property "javax.net.ssl.trustStore").
|
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_BULK_PROTOCOL
Use dedicated COM_STMT_BULK_EXECUTE protocol for batch insert when possible.
|
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_RESET_CONNECTION
Use COM_RESET_CONNECTION when resetting connection for pools when server permit it (MariaDB > 10.2.4, MySQL > 5.7.3)
This permit to reset session and user variables.
|
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.
|
Modifier and Type | Method and Description |
---|---|
static Options |
defaultValues(HaMode haMode) |
static Options |
defaultValues(HaMode haMode,
boolean pool)
Generate an Options object with default value corresponding to High Availability mode.
|
String |
getOptionName() |
static void |
optionCoherenceValidation(Options options)
Option initialisation end : set option value to a coherent state.
|
static void |
parse(HaMode haMode,
String urlParameters,
Options options)
Parse additional properties.
|
static Options |
parse(HaMode haMode,
String urlParameters,
Properties properties,
Options options)
Parse additional properties .
|
static void |
propertyString(Options options,
HaMode haMode,
StringBuilder sb)
Generate parameter String equivalent to options.
|
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.
|
public static final DefaultOptions USER
public static final DefaultOptions PASSWORD
public static final DefaultOptions CONNECT_TIMEOUT
public static final DefaultOptions PIPE
public static final DefaultOptions LOCAL_SOCKET
public static final DefaultOptions SHARED_MEMORY
public static final DefaultOptions TCP_NO_DELAY
public static final DefaultOptions TCP_ABORTIVE_CLOSE
public static final DefaultOptions LOCAL_SOCKET_ADDRESS
public static final DefaultOptions SOCKET_TIMEOUT
public static final DefaultOptions INTERACTIVE_CLIENT
public static final DefaultOptions DUMP_QUERY_ON_EXCEPTION
public static final DefaultOptions USE_OLD_ALIAS_METADATA_BEHAVIOR
public static final DefaultOptions ALLOW_LOCAL_INFILE
public static final DefaultOptions SESSION_VARIABLES
public static final DefaultOptions CREATE_DATABASE_IF_NOT_EXISTS
public static final DefaultOptions SERVER_TIMEZONE
public static final DefaultOptions NULL_CATALOG_MEANS_CURRENT
public static final DefaultOptions TINY_INT_IS_BIT
public static final DefaultOptions YEAR_IS_DATE_TYPE
public static final DefaultOptions USE_SSL
public static final DefaultOptions USER_COMPRESSION
public static final DefaultOptions ALLOW_MULTI_QUERIES
public static final DefaultOptions REWRITE_BATCHED_STATEMENTS
public static final DefaultOptions TCP_KEEP_ALIVE
public static final DefaultOptions TCP_RCV_BUF
public static final DefaultOptions TCP_SND_BUF
public static final DefaultOptions SOCKET_FACTORY
public static final DefaultOptions PIN_GLOBAL_TX_TO_PHYSICAL_CONNECTION
public static final DefaultOptions TRUST_SERVER_CERTIFICATE
public static final DefaultOptions SERVER_SSL_CERT
public static final DefaultOptions USE_FRACTIONAL_SECONDS
public static final DefaultOptions AUTO_RECONNECT
public static final DefaultOptions FAIL_ON_READ_ONLY
public static final DefaultOptions RETRY_ALL_DOWN
public static final DefaultOptions FAILOVER_LOOP_RETRIES
public static final DefaultOptions VALID_CONNECTION_TIMEOUT
public static final DefaultOptions LOAD_BALANCE_BLACKLIST_TIMEOUT
public static final DefaultOptions CACHEPREPSTMTS
public static final DefaultOptions PREPSTMTCACHESIZE
public static final DefaultOptions PREPSTMTCACHESQLLIMIT
public static final DefaultOptions ASSUREREADONLY
public static final DefaultOptions USELEGACYDATETIMECODE
public static final DefaultOptions MAXIMIZEMYSQLCOMPATIBILITY
public static final DefaultOptions USESERVERPREPSTMTS
public static final DefaultOptions TRUSTSTORE
(legacy alias trustCertificateKeyStoreUrl)
public static final DefaultOptions TRUST_CERTIFICATE_KEYSTORE_PASSWORD
(legacy alias trustCertificateKeyStorePassword)
public static final DefaultOptions KEYSTORE
public static final DefaultOptions KEYSTORE_PASSWORD
public static final DefaultOptions PRIVATE_KEYS_PASSWORD
public static final DefaultOptions ENABLED_SSL_PROTOCOL_SUITES
public static final DefaultOptions ENABLED_SSL_CIPHER_SUITES
public static final DefaultOptions CONTINUE_BATCH_ON_ERROR
public static final DefaultOptions JDBCOMPLIANTRUNCATION
public static final DefaultOptions CACHE_CALLABLE_STMTS
public static final DefaultOptions CALLABLE_STMT_CACHE_SIZE
public static final DefaultOptions CONNECTION_ATTRIBUTES
public static final DefaultOptions USE_BATCH_MULTI_SEND
public static final DefaultOptions USE_BATCH_MULTI_SEND_NUMBER
public static final DefaultOptions LOGGING
public static final DefaultOptions PROFILESQL
public static final DefaultOptions MAX_QUERY_LOG_SIZE
public static final DefaultOptions SLOW_QUERY_TIME
public static final DefaultOptions PASSWORD_CHARACTER_ENCODING
public static final DefaultOptions PIPELINE_AUTH
public static final DefaultOptions ENABLE_PACKET_DEBUG
public static final DefaultOptions SSL_HOSTNAME_VERIFICATION
public static final DefaultOptions USE_BULK_PROTOCOL
public static final DefaultOptions AUTOCOMMIT
public static final DefaultOptions POOL
public static final DefaultOptions POOL_NAME
public static final DefaultOptions MAX_POOL_SIZE
public static final DefaultOptions MIN_POOL_SIZE
public static final DefaultOptions MAX_IDLE_TIME
public static final DefaultOptions POOL_VALID_MIN_DELAY
public static final DefaultOptions STATIC_GLOBAL
public static final DefaultOptions REGISTER_POOL_JMX
public static final DefaultOptions USE_RESET_CONNECTION
public static final DefaultOptions ALLOW_MASTER_DOWN
public static final DefaultOptions GALERA_ALLOWED_STATE
public static DefaultOptions[] values()
for (DefaultOptions c : DefaultOptions.values()) System.out.println(c);
public static DefaultOptions valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getOptionName()
public static Options defaultValues(HaMode haMode, boolean pool)
haMode
- current high Availability modepool
- is for poolpublic static void parse(HaMode haMode, String urlParameters, Options options)
haMode
- current haMode.urlParameters
- options defined in urloptions
- initial optionspublic static Options parse(HaMode haMode, String urlParameters, Properties properties, Options options)
haMode
- current haMode.urlParameters
- options defined in urlproperties
- options defined by propertiesoptions
- initial optionspublic static void optionCoherenceValidation(Options options)
options
- optionspublic static void propertyString(Options options, HaMode haMode, StringBuilder sb)
options
- optionshaMode
- high availability Modesb
- String builderCopyright © 2018 mariadb.org. All rights reserved.