public class Configuration extends Object
basic syntax :
jdbc:singlestore:[sequential:|failover|loadbalance:]//<hostDescription>[,<hostDescription>]/[database>]
[?<key1>=<value1>[&<key2>=<value2>]]
hostDescription:
- simple :
<host>:<portnumber>
(for example localhost:3306)
- complex :
address=[(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:singlestore://[2001:0660:7401:0200:0000:0000:0edf:bdd7]:3306
Some examples :
jdbc:singlestore://localhost:3306/database?user=greg&password=pass
jdbc:singlestore://address=(port=3306)(host=master1),address=(port=3307)(host=child1)/database?user=greg&password=pass
| Modifier and Type | Class and Description |
|---|---|
static class |
Configuration.Builder
A builder for
Configuration instances. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
acceptsUrl(String url)
Tell if the driver accepts url string.
|
List<HostAddress> |
addresses()
addresses
|
boolean |
allowLocalInfile()
permits LOAD LOCAL INFILE commands
|
boolean |
allowMultiQueries()
permit using multi queries command
|
Boolean |
autocommit()
Force session autocommit on connection creation
|
boolean |
blankTableNameMeta()
force returning blank table metadata (for old oracle compatibility)
|
protected static String |
buildUrl(Configuration conf) |
boolean |
cachePrepStmts() |
Configuration |
clone(String username,
String password) |
Codec<?>[] |
codecs() |
String |
connectionAttributes() |
int |
connectTimeout()
socket connect timeout
|
Configuration |
connectTimeout(int connectTimeout)
Set connect timeout
|
boolean |
createDatabaseIfNotExist()
create database if not exist
|
CredentialPlugin |
credentialPlugin()
credential plugin to use
|
String |
database()
Connection default database
|
int |
defaultFetchSize() |
boolean |
disablePipeline() |
boolean |
dumpQueriesOnException()
Must query by logged on exception.
|
String |
enabledSslCipherSuites()
autorized cipher list.
|
String |
enabledSslProtocolSuites()
permitted ssl protocol list (comma separated)
|
boolean |
enableExtendedDataTypes() |
boolean |
equals(Object o) |
String |
geometryDefaultType() |
String |
getConsoleLogFilepath() |
String |
getConsoleLogLevel() |
HaMode |
haMode()
High availability mode
|
int |
hashCode() |
boolean |
includeThreadDumpInDeadlockExceptions() |
String |
initialUrl()
Configuration generated URL depending on current configuration option.
|
String |
initSql()
Execute initial command when connection is established
|
String |
jaasApplicationName() |
String |
keyPassword()
key store alias password
|
String |
keyStore()
key store
|
String |
keyStorePassword()
key store password
|
String |
keyStoreType()
key store type (to replace default javax.net.ssl.keyStoreType system property)
|
String |
localSocket()
local socket configuration
|
String |
localSocketAddress()
local socket address path
|
Integer |
maxAllowedPacket()
max_allowed_packet value to avoid sending packet with non supported size, droping the
connection without reason.
|
int |
maxIdleTime() |
int |
maxPoolSize() |
int |
maxPrintStackSizeToLog() |
int |
maxQuerySizeToLog() |
int |
minPoolSize() |
Properties |
nonMappedOptions() |
boolean |
nullDatabaseMeansCurrent()
When enabled, in DatabaseMetadata, will handle null database as current
|
static Configuration |
parse(String url) |
static Configuration |
parse(String url,
Properties prop)
Parse url connection string with additional properties.
|
String |
password()
configuration password
|
String |
pipe()
Pipe path
|
boolean |
pool() |
String |
poolName() |
int |
poolValidMinDelay() |
int |
prepStmtCacheSize()
Prepare statement cache size.
|
boolean |
printStackTrace() |
boolean |
registerJmxPool() |
String |
restrictedAuth() |
int |
retriesAllDown() |
boolean |
rewriteBatchedStatements() |
String |
serverSslCert()
server ssl certificate (file path / certificat content)
|
String |
servicePrincipalName() |
String |
sessionVariables()
coma separated Session variable list
|
String |
socketFactory()
Socket factory class name
|
int |
socketTimeout()
socket timeout
|
SslMode |
sslMode()
SSl mode
|
boolean |
tcpAbortiveClose()
close using TCP abortive close (RST TCP packet, in place or FIN packet)
|
boolean |
tcpKeepAlive()
socket tcp keep alive
|
int |
tcpKeepCount()
socket tcp keep count (java 11+ only)
|
int |
tcpKeepIdle()
socket tcp keep idle (java 11+ only)
|
int |
tcpKeepInterval()
socket tcp keep interval (java 11+ only)
|
boolean |
tinyInt1isBit()
Must tinyint be considered as Bit (TINYINT is always has reserved length = 4)
|
String |
tlsSocketType() |
static String |
toConf(String url)
Permit to have string information on how string is parsed.
|
String |
toString()
ToString implementation.
|
TransactionIsolation |
transactionIsolation()
Default transaction isolation
|
boolean |
transactionReplay() |
int |
transactionReplaySize()
transaction replay maximum number of saved command.
|
boolean |
transformedBitIsBoolean()
Must tinyint be considered as Boolean or Bit
|
String |
trustStore()
trust store
|
String |
trustStorePassword()
trust store password
|
String |
trustStoreType()
trust store type
|
boolean |
useAffectedRows()
Use affected row
|
boolean |
useCompression()
Enable compression if server has compression capability
|
boolean |
useMysqlVersion() |
String |
user()
configuration user
|
boolean |
useReadAheadInput() |
boolean |
useResetConnection() |
boolean |
useServerPrepStmts()
Use server prepared statement.
|
boolean |
vectorExtendedMetadata() |
String |
vectorTypeOutputFormat() |
boolean |
yearIsDateType()
Must year be return by default as Date in result-set
|
public static boolean acceptsUrl(String url)
url - url Stringpublic static Configuration parse(String url) throws SQLException
SQLExceptionpublic static Configuration parse(String url, Properties prop) throws SQLException
url - connection stringprop - propertiesSQLException - if parsing exception occurpublic static String toConf(String url) throws SQLException
Configuration:
* resulting Url : jdbc:singlestore://localhost/test
Unknown options : None
Non default options :
* database : test
default options :
* user : null
...
url - url stringSQLException - if parsing failspublic Configuration clone(String username, String password)
public String database()
public List<HostAddress> addresses()
public HaMode haMode()
public CredentialPlugin credentialPlugin()
public String user()
public String password()
public String initialUrl()
public String serverSslCert()
public String trustStore()
public String trustStorePassword()
public String trustStoreType()
public String keyStore()
public String keyStorePassword()
public String keyPassword()
public String keyStoreType()
public String enabledSslProtocolSuites()
public String socketFactory()
public int connectTimeout()
public Configuration connectTimeout(int connectTimeout)
connectTimeout - timeout valuepublic String pipe()
public String localSocket()
public boolean tcpKeepAlive()
public int tcpKeepIdle()
public int tcpKeepCount()
public int tcpKeepInterval()
public boolean tcpAbortiveClose()
public String localSocketAddress()
public int socketTimeout()
public boolean allowMultiQueries()
public boolean allowLocalInfile()
public boolean useCompression()
public boolean blankTableNameMeta()
public SslMode sslMode()
public TransactionIsolation transactionIsolation()
public String enabledSslCipherSuites()
public String sessionVariables()
public boolean tinyInt1isBit()
public boolean transformedBitIsBoolean()
public boolean yearIsDateType()
public boolean dumpQueriesOnException()
public int prepStmtCacheSize()
public boolean useAffectedRows()
public boolean disablePipeline()
public boolean useServerPrepStmts()
public String connectionAttributes()
public Boolean autocommit()
public boolean nullDatabaseMeansCurrent()
public boolean includeThreadDumpInDeadlockExceptions()
public boolean createDatabaseIfNotExist()
public String initSql()
public String servicePrincipalName()
public String jaasApplicationName()
public int defaultFetchSize()
public Properties nonMappedOptions()
public String tlsSocketType()
public int maxQuerySizeToLog()
public Integer maxAllowedPacket()
public int retriesAllDown()
public boolean pool()
public String poolName()
public int maxPoolSize()
public int minPoolSize()
public int maxIdleTime()
public boolean registerJmxPool()
public int poolValidMinDelay()
public boolean useResetConnection()
public boolean useReadAheadInput()
public boolean cachePrepStmts()
public boolean transactionReplay()
public int transactionReplaySize()
public String geometryDefaultType()
public String restrictedAuth()
public Codec<?>[] codecs()
public boolean useMysqlVersion()
public boolean rewriteBatchedStatements()
public String getConsoleLogLevel()
public String getConsoleLogFilepath()
public boolean printStackTrace()
public int maxPrintStackSizeToLog()
public boolean enableExtendedDataTypes()
public String vectorTypeOutputFormat()
public boolean vectorExtendedMetadata()
public String toString()
protected static String buildUrl(Configuration conf)
Copyright © 2025 SingleStore. All rights reserved.