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_MULTI_QUERIES
Allows multiple statements in single executeQuery.
|
ASSUREREADONLY
when in high availalability, 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.
|
CLIENT_CERTIFICATE_KEYSTORE_URL
Use the specified keystore for client certificates (can be the same as the trusted root certificate keystore).
|
CONNECT_TIMOUT |
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.
|
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.
|
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.
|
MAXIMIZEMYSQLCOMPATIBILITY
maximize Mysql compatibility.
|
NO_ACCESS_TO_PROCEDURE_BODIES
Indicate to the driver that user don't have access to procedure metadata informations (mysql.proc table).
|
NULL_CATALOG_MEANS_CURRENT
DatabaseMetaData use current catalog if null.
|
PASSWORD
Password of database user.
|
PIN_GLOBAL_TX_TO_PHYSICAL_CONNECTION |
PIPE
On Windows, specify named pipe name to connect to mysqld.exe.
|
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.
|
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.
|
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 keystore.
|
TRUST_CERTIFICATE_KEYSTORE_URL
Use the specified keystore for trusted root certificates.
|
TRUST_SERVER_CERTIFICATE
When using SSL, do not check server's certificate.
|
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_READ_AHEAD_INPUT
Read socket data in advance when available packet to avoid socket buffering.
|
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 havn't been lost.
|
YEAR_IS_DATE_TYPE
Year is date type, rather than numerical.
|
Modifier and Type | Field and Description |
---|---|
protected Object |
defaultValue |
protected String |
implementationVersion |
protected Object |
maxValue |
protected Object |
minValue |
protected String |
name |
protected Object |
objType |
protected Object |
value |
Modifier and Type | Method and Description |
---|---|
static Options |
addProperty(HaMode haMode,
Properties additionnalProperties,
Options options) |
static Options |
addProperty(HaMode haMode,
String name,
String value,
Options options)
Add a property (name + value) to current session options
|
boolean |
boolValue()
Return boolean value.
|
static Options |
defaultValues(HaMode haMode) |
static Properties |
getProperties(Options options)
Get properties from session options.
|
static String |
getProperties(String optionName,
Options options)
Get properties value by name.
|
int |
intValue()
Return an integer value.
|
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 .
|
String |
stringValue()
Return String value.
|
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_TIMOUT
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 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 TRUST_CERTIFICATE_KEYSTORE_URL
public static final DefaultOptions TRUST_CERTIFICATE_KEYSTORE_PASSWORD
public static final DefaultOptions CLIENT_CERTIFICATE_KEYSTORE_URL
public static final DefaultOptions CLIENT_CERTIFICATE_KEYSTORE_PASSWORD
public static final DefaultOptions CONTINUE_BATCH_ON_ERROR
public static final DefaultOptions JDBCOMPLIANTRUNCATION
public static final DefaultOptions USE_READ_AHEAD_INPUT
public static final DefaultOptions CACHE_CALLABLE_STMTS
public static final DefaultOptions CALLABLE_STMT_CACHE_SIZE
public static final DefaultOptions NO_ACCESS_TO_PROCEDURE_BODIES
protected final String name
protected final Object objType
protected final Object defaultValue
protected final Object minValue
protected final Object maxValue
protected final String implementationVersion
protected Object value
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 static Options addProperty(HaMode haMode, String name, String value, Options options)
haMode
- current haMode.name
- property namevalue
- new property valueoptions
- session options.public static Options addProperty(HaMode haMode, Properties additionnalProperties, Options options)
public static Options parse(HaMode haMode, String urlParameters, Properties properties)
public 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 Properties getProperties(Options options)
options
- session options.public static String getProperties(String optionName, Options options)
optionName
- String nameoptions
- session options.public int intValue()
public boolean boolValue()
public String stringValue()
Copyright © 2016. All rights reserved.