public final class JdbcUrlUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
Default Cassandra cluster port.
|
static String |
KEY_ACTIVE_PROFILE
JDBC URL parameter key for the active execution profile.
|
static String |
KEY_CLOUD_SECURE_CONNECT_BUNDLE
JDBC URL parameter key for the cloud secure connect bundle.
|
static String |
KEY_COMPLIANCE_MODE
JDBC URL parameter key for the compliance mode.
|
static String |
KEY_CONFIG_FILE
JDBC URL parameter key for the configuration file.
|
static String |
KEY_CONNECT_TIMEOUT
JDBC URL parameter key for the connection timeout.
|
static String |
KEY_CONSISTENCY
JDBC URL parameter key for the consistency.
|
static String |
KEY_DEBUG
JDBC URL parameter key for the debug mode.
|
static String |
KEY_ENABLE_SSL
JDBC URL parameter key for SSL enabling.
|
static String |
KEY_FETCH_SIZE
JDBC URL parameter key for the fetch size (request page size).
|
static String |
KEY_KEEP_ALIVE
JDBC URL parameter key for the TCP keep-alive enabling.
|
static String |
KEY_LOAD_BALANCING_POLICY
JDBC URL parameter key for the load balancing policy.
|
static String |
KEY_LOCAL_DATACENTER
JDBC URL parameter key for the local data center.
|
static String |
KEY_PASSWORD
JDBC URL parameter key for the user password.
|
static String |
KEY_RECONNECT_POLICY
JDBC URL parameter key for the reconnection policy.
|
static String |
KEY_REQUEST_TIMEOUT
JDBC URL parameter key for the request timeout.
|
static String |
KEY_RETRY_POLICY
JDBC URL parameter key for the retry policy.
|
static String |
KEY_SSL_ENGINE_FACTORY
JDBC URL parameter key for the custom SSL engine factory (
SslEngineFactory). |
static String |
KEY_SSL_HOSTNAME_VERIFICATION
JDBC URL parameter key for SSL hostname verification disabling.
|
static String |
KEY_TCP_NO_DELAY
JDBC URL parameter key for the Nagle's algorithm enabling.
|
static String |
KEY_USE_KERBEROS
JDBC URL parameter key for Kerberos auth provider enabling.
|
static String |
KEY_USER
JDBC URL parameter key for the username.
|
static String |
PROTOCOL
JDBC protocol for Cassandra connection.
|
static String |
PROTOCOL_DBAAS
JDBC protocol for Cassandra DBaaS connection.
|
static String |
TAG_ACTIVE_PROFILE
Property name used to retrieve the execution profile to use when the connection to Cassandra is created.
|
static String |
TAG_CLOUD_SECURE_CONNECT_BUNDLE
Property name used to retrieve the secure connect Bundle when the connection to Cassandra DBaaS is established.
|
static String |
TAG_COMPLIANCE_MODE
Property name used to retrieve the compliance mode to use when the connection to Cassandra is established.
|
static String |
TAG_CONFIG_FILE
Property name used to retrieve the configuration file when the connection to Cassandra is established.
|
static String |
TAG_CONNECT_TIMEOUT
Property name used to retrieve the connection timeout when the connection to Cassandra is established.
|
static String |
TAG_CONSISTENCY_LEVEL
Property name used to retrieve the consistency when the connection to Cassandra is established.
|
static String |
TAG_CONTACT_POINTS
Property name used to retrieve the contact points when the connection to Cassandra is established.
|
static String |
TAG_DATABASE_NAME
Property name used to retrieve the keyspace name when the connection to Cassandra is established.
|
static String |
TAG_DBAAS_CONNECTION
Property name used to determine if the current connection is established to a cloud database.
|
static String |
TAG_DEBUG
Property name used to retrieve the debug mode value when the connection to Cassandra is established.
|
static String |
TAG_ENABLE_SSL
Property name used to retrieve the SSL enabling value when the connection to Cassandra is established.
|
static String |
TAG_FETCH_SIZE
Property name used to retrieve the fetch size (request page size) when the connection to Cassandra is
established.
|
static String |
TAG_KEEP_ALIVE
Property name used to retrieve the TCP keep-alive enabling when the connection to Cassandra is established.
|
static String |
TAG_LOAD_BALANCING_POLICY
Property name used to retrieve the load balancing policy when the connection to Cassandra is established.
|
static String |
TAG_LOCAL_DATACENTER
Property name used to retrieve the local data center when the connection to Cassandra is established.
|
static String |
TAG_PASSWORD
Property name used to retrieve the user password when the connection to Cassandra is established.
|
static String |
TAG_RECONNECT_POLICY
Property name used to retrieve the reconnection policy when the connection to Cassandra is established.
|
static String |
TAG_REQUEST_TIMEOUT
Property name used to retrieve the request timeout when the connection to Cassandra is established.
|
static String |
TAG_RETRY_POLICY
Property name used to retrieve the retry policy when the connection to Cassandra is established.
|
static String |
TAG_SSL_ENGINE_FACTORY
Property name used to retrieve the custom SSL engine factory when the connection to Cassandra is established.
|
static String |
TAG_SSL_HOSTNAME_VERIFICATION
Property name used to retrieve the SSL hostname verification enabling when the connection to Cassandra is
established.
|
static String |
TAG_TCP_NO_DELAY
Property name used to retrieve the Nagle's algorithm enabling when the connection to Cassandra is established.
|
static String |
TAG_USE_KERBEROS
Property name used to retrieve the Kerberos auth provider enabling when the connection to Cassandra is
established.
|
static String |
TAG_USER
Property name used to retrieve the username when the connection to Cassandra is established.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createSubName(Properties props)
Creates a "sub-name" portion of a JDBC URL from properties.
|
static Map<com.datastax.oss.driver.api.core.config.DriverOption,Object> |
parseReconnectionPolicy(String reconnectionPolicyString)
Parses the reconnection policy from a given string.
|
static Properties |
parseURL(String url)
Parses a URL for the Cassandra JDBC Driver.
|
public static final int DEFAULT_PORT
public static final String PROTOCOL
public static final String PROTOCOL_DBAAS
public static final String KEY_CONSISTENCY
public static final String TAG_CONSISTENCY_LEVEL
consistency.public static final String KEY_FETCH_SIZE
public static final String TAG_FETCH_SIZE
fetchsize.public static final String KEY_LOAD_BALANCING_POLICY
public static final String TAG_LOAD_BALANCING_POLICY
loadbalancing.public static final String KEY_LOCAL_DATACENTER
public static final String TAG_LOCAL_DATACENTER
localdatacenter.public static final String KEY_RETRY_POLICY
public static final String TAG_RETRY_POLICY
retry.public static final String KEY_RECONNECT_POLICY
public static final String TAG_RECONNECT_POLICY
reconnection.public static final String KEY_DEBUG
public static final String TAG_DEBUG
debug.public static final String KEY_ENABLE_SSL
public static final String TAG_ENABLE_SSL
enablessl.public static final String KEY_SSL_ENGINE_FACTORY
SslEngineFactory).public static final String TAG_SSL_ENGINE_FACTORY
sslenginefactory.public static final String KEY_SSL_HOSTNAME_VERIFICATION
public static final String TAG_SSL_HOSTNAME_VERIFICATION
hostnameverification.public static final String KEY_CLOUD_SECURE_CONNECT_BUNDLE
public static final String TAG_CLOUD_SECURE_CONNECT_BUNDLE
secureconnectbundle.public static final String KEY_USER
public static final String TAG_USER
user.public static final String KEY_PASSWORD
public static final String TAG_PASSWORD
password.public static final String KEY_USE_KERBEROS
public static final String TAG_USE_KERBEROS
usekrb5.public static final String KEY_REQUEST_TIMEOUT
public static final String TAG_REQUEST_TIMEOUT
requesttimeout.public static final String KEY_CONNECT_TIMEOUT
public static final String TAG_CONNECT_TIMEOUT
connecttimeout.public static final String KEY_TCP_NO_DELAY
public static final String TAG_TCP_NO_DELAY
tcpnodelay.public static final String KEY_KEEP_ALIVE
public static final String TAG_KEEP_ALIVE
keepalive.public static final String KEY_CONFIG_FILE
public static final String TAG_CONFIG_FILE
configfile.public static final String KEY_COMPLIANCE_MODE
public static final String TAG_COMPLIANCE_MODE
compliancemode.public static final String TAG_DATABASE_NAME
public static final String TAG_CONTACT_POINTS
public static final String TAG_ACTIVE_PROFILE
activeprofile.public static final String KEY_ACTIVE_PROFILE
public static final String TAG_DBAAS_CONNECTION
PROTOCOL_DBAAS).public static Properties parseURL(String url) throws SQLException
The URL must start with the protocol "jdbc:cassandra:" or "jdbc:cassandra:dbaas:" for a connection to a cloud database. The URI part (the "sub-name") must contain a host, an optional port and optional keyspace name, for example: "//localhost:9160/Test1", except for a connection to a cloud database, in this case, a simple keyspace with a secure connect bundle is sufficient, for example: "///Test1?secureconnectbundle=/path/to/bundle.zip".
url - The full JDBC URL to be parsed.SQLException - when something went wrong during the URL parsing.SQLSyntaxErrorException - when the URL syntax is invalid.SQLNonTransientConnectionException - when the host is missing in the URL.public static String createSubName(Properties props) throws SQLException
props - A Properties instance containing all the properties to be considered.SQLException - when something went wrong during the "sub-name" creation.SQLNonTransientConnectionException - when the host name is missing.public static Map<com.datastax.oss.driver.api.core.config.DriverOption,Object> parseReconnectionPolicy(String reconnectionPolicyString)
reconnectionPolicyString - The string containing the reconnection policy value.DriverOption values parsed from the given string.Copyright © 2020–2024 ING Bank. All rights reserved.