public class ConnectionPropertiesImpl extends Object implements ConnectionProperties, Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_PREFIX
Prefix for property names.
|
SSL_MODE_DISABLE, SSL_MODE_REQUIRE| Constructor and Description |
|---|
ConnectionPropertiesImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
disabledFeatures()
Any JDBC features could be force disabled.
|
void |
disabledFeatures(String features) |
HostAndPortRange[] |
getAddresses() |
int |
getConnectionTimeout()
Note: zero value means there is no limits.
|
DriverPropertyInfo[] |
getDriverPropertyInfo() |
int |
getPartitionAwarenessPartitionDistributionsCacheSize() |
int |
getPartitionAwarenessSqlCacheSize() |
String |
getPassword() |
String |
getQueryEngine() |
Integer |
getQueryTimeout()
Note: zero value means there is no limits.
|
String |
getSchema() |
int |
getSocketReceiveBuffer() |
int |
getSocketSendBuffer() |
String |
getSslCipherSuites()
Gets cipher suites.
|
String |
getSslClientCertificateKeyStorePassword()
Gets key store password.
|
String |
getSslClientCertificateKeyStoreType()
Gets key store type used for context creation.
|
String |
getSslClientCertificateKeyStoreUrl()
Gets the key store URL.
|
String |
getSslFactory()
Gets the class name of the custom implementation of the Factory<SSLSocketFactory>.
|
String |
getSslKeyAlgorithm()
Gets algorithm that will be used to create a key manager.
|
String |
getSslMode()
Gets SSL connection mode.
|
String |
getSslProtocol()
Gets protocol for secure transport.
|
String |
getSslTrustCertificateKeyStorePassword()
Gets trust store password.
|
String |
getSslTrustCertificateKeyStoreType()
Gets trust store type.
|
String |
getSslTrustCertificateKeyStoreUrl()
Gets the trust store URL.
|
@Nullable Integer |
getUpdateBatchSize()
Note: Batch size of 1 prevents deadlock on update where keys sequence are different in several concurrent updates.
|
String |
getUrl() |
String |
getUserAttributesFactory()
Gets the class name of the custom implementation of the Factory<Map<String, String>>.
|
String |
getUsername() |
void |
init(String url,
Properties props) |
boolean |
isAutoCloseServerCursor() |
boolean |
isCollocated() |
@Nullable Boolean |
isDataPageScanEnabled() |
boolean |
isDistributedJoins() |
boolean |
isEnforceJoinOrder() |
boolean |
isKeepBinary()
Get keep binary configuration flag.
|
boolean |
isLazy() |
boolean |
isPartitionAwareness() |
boolean |
isReplicatedOnly() |
boolean |
isSkipReducerOnUpdate() |
boolean |
isSslTrustAll()
Gets trust any server certificate flag.
|
boolean |
isTcpNoDelay() |
String |
nestedTxMode() |
void |
nestedTxMode(String val) |
void |
setAddresses(HostAndPortRange[] addrs) |
void |
setAutoCloseServerCursor(boolean val) |
void |
setCollocated(boolean val) |
void |
setConnectionTimeout(@Nullable Integer timeout)
Note: zero value means there is no limits.
|
void |
setDataPageScanEnabled(@Nullable Boolean dataPageScanEnabled) |
void |
setDistributedJoins(boolean val) |
void |
setEnforceJoinOrder(boolean val) |
void |
setKeepBinary(boolean keepBinary)
Set to
true to keep binary objects in binary form. |
void |
setLazy(boolean val) |
void |
setPartitionAwareness(boolean partitionAwareness) |
void |
setPartitionAwarenessPartitionDistributionsCacheSize(int partitionAwarenessPartDistributionsCacheSize)
Sets partition distributions cache size that is used within partition awareness optimizations.
|
void |
setPartitionAwarenessSqlCacheSize(int partitionAwarenessSqlCacheSize)
Sets SQL cache size that is used within partition awareness optimizations.
|
void |
setPassword(String passwd) |
void |
setQueryEngine(String qryEngine)
Sets SQL query engine for a connection.
|
void |
setQueryTimeout(@Nullable Integer timeout)
Note: zero value means there is no limits.
|
void |
setReplicatedOnly(boolean val) |
void |
setSchema(String schema) |
void |
setSkipReducerOnUpdate(boolean val) |
void |
setSocketReceiveBuffer(int size) |
void |
setSocketSendBuffer(int size) |
void |
setSslCipherSuites(String sslCipherSuites)
Override default cipher suites.
|
void |
setSslClientCertificateKeyStorePassword(String passwd)
Sets key store password.
|
void |
setSslClientCertificateKeyStoreType(String ksType)
Sets key store type used in context initialization.
|
void |
setSslClientCertificateKeyStoreUrl(String url)
Sets path to the key store file.
|
void |
setSslFactory(String sslFactory)
Sets the class name of the custom implementation of the Factory<SSLSocketFactory>.
|
void |
setSslKeyAlgorithm(String keyAlgorithm)
Sets key manager algorithm that will be used to create a key manager.
|
void |
setSslMode(String mode)
Use SSL connection to Ignite node.
|
void |
setSslProtocol(String sslProtocol)
Sets protocol for secure transport.
|
void |
setSslTrustAll(boolean trustAll)
Sets to
true to trust any server certificate (revoked, expired or self-signed SSL certificates). |
void |
setSslTrustCertificateKeyStorePassword(String passwd)
Sets trust store password.
|
void |
setSslTrustCertificateKeyStoreType(String ksType)
Sets trust store type.
|
void |
setSslTrustCertificateKeyStoreUrl(String url)
Sets path to the trust store file.
|
void |
setTcpNoDelay(boolean val) |
void |
setUpdateBatchSize(@Nullable Integer updateBatchSize)
Note: Set to 1 to prevent deadlock on update where keys sequence are different in several concurrent updates.
|
void |
setUrl(String url) |
void |
setUserAttributesFactory(String cls)
Sets the class name of the custom implementation of the Factory<Map<String, String>>.
|
void |
setUsername(String name) |
Properties |
storeToProperties() |
public static final String PROP_PREFIX
public String getSchema()
getSchema in interface ConnectionPropertiespublic void setSchema(String schema)
setSchema in interface ConnectionPropertiesschema - Schema name of the connection.public String getUrl()
getUrl in interface ConnectionPropertiespublic void setUrl(String url) throws SQLException
setUrl in interface ConnectionPropertiesurl - The URL of the connection.SQLException - On invalid URL.public HostAndPortRange[] getAddresses()
getAddresses in interface ConnectionPropertiespublic void setAddresses(HostAndPortRange[] addrs)
setAddresses in interface ConnectionPropertiesaddrs - Ignite nodes addresses.public boolean isDistributedJoins()
isDistributedJoins in interface ConnectionPropertiespublic void setDistributedJoins(boolean val)
setDistributedJoins in interface ConnectionPropertiesval - Distributed joins flag.public boolean isEnforceJoinOrder()
isEnforceJoinOrder in interface ConnectionPropertiespublic void setEnforceJoinOrder(boolean val)
setEnforceJoinOrder in interface ConnectionPropertiesval - Enforce join order flag.public boolean isCollocated()
isCollocated in interface ConnectionPropertiespublic void setCollocated(boolean val)
setCollocated in interface ConnectionPropertiesval - Collocated flag.public boolean isReplicatedOnly()
isReplicatedOnly in interface ConnectionPropertiespublic void setReplicatedOnly(boolean val)
setReplicatedOnly in interface ConnectionPropertiesval - Replicated only flag.public boolean isAutoCloseServerCursor()
isAutoCloseServerCursor in interface ConnectionPropertiespublic void setAutoCloseServerCursor(boolean val)
setAutoCloseServerCursor in interface ConnectionPropertiesval - Auto close server cursors flag.public int getSocketSendBuffer()
getSocketSendBuffer in interface ConnectionPropertiespublic void setSocketSendBuffer(int size)
throws SQLException
setSocketSendBuffer in interface ConnectionPropertiessize - Socket send buffer size.SQLException - On error.public int getSocketReceiveBuffer()
getSocketReceiveBuffer in interface ConnectionPropertiespublic void setSocketReceiveBuffer(int size)
throws SQLException
setSocketReceiveBuffer in interface ConnectionPropertiessize - Socket receive buffer size.SQLException - On error.public boolean isTcpNoDelay()
isTcpNoDelay in interface ConnectionPropertiespublic void setTcpNoDelay(boolean val)
setTcpNoDelay in interface ConnectionPropertiesval - TCP no delay flag.public boolean isLazy()
isLazy in interface ConnectionPropertiespublic void setLazy(boolean val)
setLazy in interface ConnectionPropertiesval - Lazy query execution flag.public boolean isSkipReducerOnUpdate()
isSkipReducerOnUpdate in interface ConnectionPropertiespublic void setSkipReducerOnUpdate(boolean val)
setSkipReducerOnUpdate in interface ConnectionPropertiesval - Skip reducer on update flag.public String getSslMode()
getSslMode in interface ConnectionPropertiesConnectionProperties.setSslMode(String).public void setSslMode(String mode)
"require" SSL context must be configured.
ConnectionProperties.setSslClientCertificateKeyStoreUrl(java.lang.String) property and related properties must be set up
or JSSE properties must be set up (see javax.net.ssl.keyStore and other javax.net.ssl.*
properties)
In case set to "disable" plain connection is used.
Available modes: "disable", "require". Default value is "disable"setSslMode in interface ConnectionPropertiesmode - SSL mode.public String getSslProtocol()
getSslProtocol in interface ConnectionPropertiespublic void setSslProtocol(String sslProtocol)
See more at JSSE Reference Guide.
setSslProtocol in interface ConnectionPropertiessslProtocol - SSL protocol name.public String getSslCipherSuites()
getSslCipherSuites in interface ConnectionPropertiespublic void setSslCipherSuites(String sslCipherSuites)
See more at JSSE Reference Guide.
setSslCipherSuites in interface ConnectionPropertiessslCipherSuites - SSL cipher suites.public String getSslKeyAlgorithm()
getSslKeyAlgorithm in interface ConnectionPropertiespublic void setSslKeyAlgorithm(String keyAlgorithm)
See more at JSSE Reference Guide.
setSslKeyAlgorithm in interface ConnectionPropertieskeyAlgorithm - Key algorithm name.public String getSslClientCertificateKeyStoreUrl()
getSslClientCertificateKeyStoreUrl in interface ConnectionPropertiespublic void setSslClientCertificateKeyStoreUrl(String url)
ConnectionProperties.getSslMode() is required and key store URL isn't specified by Ignite properties
(e.g. at JDBC URL) the JSSE property javax.net.ssl.keyStore will be used.setSslClientCertificateKeyStoreUrl in interface ConnectionPropertiesurl - Client certificate KeyStore URL.public String getSslClientCertificateKeyStorePassword()
getSslClientCertificateKeyStorePassword in interface ConnectionPropertiespublic void setSslClientCertificateKeyStorePassword(String passwd)
ConnectionProperties.getSslMode() is required and key store password isn't specified by Ignite properties
(e.g. at JDBC URL) the JSSE property javax.net.ssl.keyStorePassword will be used.setSslClientCertificateKeyStorePassword in interface ConnectionPropertiespasswd - Client certificate KeyStore password.public String getSslClientCertificateKeyStoreType()
getSslClientCertificateKeyStoreType in interface ConnectionPropertiespublic void setSslClientCertificateKeyStoreType(String ksType)
ConnectionProperties.getSslMode() is required and key store type isn't specified by Ignite properties
(e.g. at JDBC URL)the JSSE property javax.net.ssl.keyStoreType will be used.
In case both Ignite properties and JSSE properties are not set the default 'JKS' type is used.
See more at JSSE Reference Guide.
setSslClientCertificateKeyStoreType in interface ConnectionPropertiesksType - Client certificate KeyStore type.public String getSslTrustCertificateKeyStoreUrl()
getSslTrustCertificateKeyStoreUrl in interface ConnectionPropertiespublic void setSslTrustCertificateKeyStoreUrl(String url)
setSslTrustCertificateKeyStoreUrl(String), ConnectionProperties.setSslTrustAll(boolean)
properties must be set.
In case ConnectionProperties.getSslMode() is required and trust store URL isn't specified by Ignite properties
(e.g. at JDBC URL) the JSSE property javax.net.ssl.trustStore will be used.setSslTrustCertificateKeyStoreUrl in interface ConnectionPropertiesurl - Trusted certificate KeyStore URL.public String getSslTrustCertificateKeyStorePassword()
getSslTrustCertificateKeyStorePassword in interface ConnectionPropertiespublic void setSslTrustCertificateKeyStorePassword(String passwd)
ConnectionProperties.getSslMode() is required and trust store password isn't specified by Ignite properties
(e.g. at JDBC URL) the JSSE property javax.net.ssl.trustStorePassword will be used.setSslTrustCertificateKeyStorePassword in interface ConnectionPropertiespasswd - Trusted certificate KeyStore password.public String getSslTrustCertificateKeyStoreType()
getSslTrustCertificateKeyStoreType in interface ConnectionPropertiespublic void setSslTrustCertificateKeyStoreType(String ksType)
ConnectionProperties.getSslMode() is required and trust store type isn't specified by Ignite properties
(e.g. at JDBC URL) the JSSE property javax.net.ssl.trustStoreType will be used.
In case both Ignite properties and JSSE properties are not set the default 'JKS' type is used.setSslTrustCertificateKeyStoreType in interface ConnectionPropertiesksType - Trusted certificate KeyStore type.public boolean isSslTrustAll()
isSslTrustAll in interface ConnectionPropertiespublic void setSslTrustAll(boolean trustAll)
true to trust any server certificate (revoked, expired or self-signed SSL certificates).
Defaults is false.
Note: Do not enable this option in production you are ever going to use
on a network you do not entirely trust. Especially anything going over the public internet.
setSslTrustAll in interface ConnectionPropertiestrustAll - Trust all certificates flag.public String getSslFactory()
getSslFactory in interface ConnectionPropertiespublic void setSslFactory(String sslFactory)
ConnectionProperties.getSslMode() is required and factory is specified the custom factory will be used
instead of JSSE socket factory. So, other SSL properties will be ignored.setSslFactory in interface ConnectionPropertiessslFactory - Custom class name that implements Factory<SSLSocketFactory>.public String nestedTxMode()
nestedTxMode in interface ConnectionPropertiespublic void nestedTxMode(String val)
nestedTxMode in interface ConnectionPropertiesval - Nested transactions handling strategy.public void setUsername(String name)
setUsername in interface ConnectionPropertiesname - User name to authentication.public String getUsername()
getUsername in interface ConnectionPropertiespublic void setPassword(String passwd)
setPassword in interface ConnectionPropertiespasswd - User's password.public String getPassword()
getPassword in interface ConnectionProperties@Nullable public @Nullable Boolean isDataPageScanEnabled()
isDataPageScanEnabled in interface ConnectionPropertiestrue if data page scan support is enabled for this connection, false if it's disabled
and null for server default.public void setDataPageScanEnabled(@Nullable
@Nullable Boolean dataPageScanEnabled)
setDataPageScanEnabled in interface ConnectionPropertiesdataPageScanEnabled - true if data page scan support is enabled for this connection,
if false then it's disabled, if null then server should use its default settings.public boolean isPartitionAwareness()
isPartitionAwareness in interface ConnectionPropertiestrue if jdbc thin partition awareness is enabled for this connection,
false if it's disabled.public void setPartitionAwareness(boolean partitionAwareness)
setPartitionAwareness in interface ConnectionPropertiespartitionAwareness - true if jdbc thin partition awareness is enabled
for this connection, if false then it's disabled.@Nullable public @Nullable Integer getUpdateBatchSize()
getUpdateBatchSize in interface ConnectionPropertiespublic void setUpdateBatchSize(@Nullable
@Nullable Integer updateBatchSize)
throws SQLException
setUpdateBatchSize in interface ConnectionPropertiesupdateBatchSize - update internal bach size.SQLException - On error.public int getPartitionAwarenessSqlCacheSize()
getPartitionAwarenessSqlCacheSize in interface ConnectionPropertiespublic void setPartitionAwarenessSqlCacheSize(int partitionAwarenessSqlCacheSize)
throws SQLException
setPartitionAwarenessSqlCacheSize in interface ConnectionPropertiespartitionAwarenessSqlCacheSize - SQL cache size.SQLException - On error.public int getPartitionAwarenessPartitionDistributionsCacheSize()
getPartitionAwarenessPartitionDistributionsCacheSize in interface ConnectionPropertiespublic void setPartitionAwarenessPartitionDistributionsCacheSize(int partitionAwarenessPartDistributionsCacheSize)
throws SQLException
setPartitionAwarenessPartitionDistributionsCacheSize in interface ConnectionPropertiespartitionAwarenessPartDistributionsCacheSize - Partition distributions cache size.SQLException - On error.public Integer getQueryTimeout()
getQueryTimeout in interface ConnectionPropertiespublic void setQueryTimeout(@Nullable
@Nullable Integer timeout)
throws SQLException
setQueryTimeout in interface ConnectionPropertiestimeout - Query timeout in seconds.SQLExceptionpublic int getConnectionTimeout()
getConnectionTimeout in interface ConnectionPropertiespublic void setConnectionTimeout(@Nullable
@Nullable Integer timeout)
throws SQLException
setConnectionTimeout in interface ConnectionPropertiestimeout - Connection timeout in milliseconds.SQLExceptionpublic String getUserAttributesFactory()
getUserAttributesFactory in interface ConnectionPropertiespublic void setUserAttributesFactory(String cls)
GridRestRequest or
ClientListenerAbstractConnectionContext (depends on client type).setUserAttributesFactory in interface ConnectionPropertiescls - Custom class name that implements Factory<Map<String, String>>.public String disabledFeatures()
JdbcThinFeature.
The string should contain enumeration of feature names, separated by the comma.disabledFeatures in interface ConnectionPropertiespublic void disabledFeatures(String features)
disabledFeatures in interface ConnectionPropertiesfeatures - Disabled features. See JdbcThinFeature.
The string should contain enumeration of feature names, separated by the comma.public boolean isKeepBinary()
isKeepBinary in interface ConnectionPropertiespublic void setKeepBinary(boolean keepBinary)
true to keep binary objects in binary form.
Defaults is false.
setKeepBinary in interface ConnectionPropertieskeepBinary - Whether to keep binary objects in binary form.public String getQueryEngine()
getQueryEngine in interface ConnectionPropertiespublic void setQueryEngine(String qryEngine)
setQueryEngine in interface ConnectionPropertiesqryEngine - SQL Query engine name.public void init(String url, Properties props) throws SQLException
url - URL connection.props - Environment properties.SQLException - On error.public DriverPropertyInfo[] getDriverPropertyInfo()
public Properties storeToProperties()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023