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 |
|---|---|
HostAndPortRange[] |
getAddresses() |
DriverPropertyInfo[] |
getDriverPropertyInfo() |
String |
getPassword() |
String |
getSchema() |
int |
getSocketReceiveBuffer() |
int |
getSocketSendBuffer() |
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.
|
String |
getUrl() |
String |
getUsername() |
void |
init(String url,
Properties props) |
boolean |
isAutoCloseServerCursor() |
boolean |
isCollocated() |
boolean |
isDistributedJoins() |
boolean |
isEnforceJoinOrder() |
boolean |
isLazy() |
boolean |
isReplicatedOnly() |
boolean |
isSkipReducerOnUpdate() |
boolean |
isSslTrustAll()
Gets trust any server certificate flag.
|
boolean |
isTcpNoDelay() |
void |
setAddresses(HostAndPortRange[] addrs) |
void |
setAutoCloseServerCursor(boolean val) |
void |
setCollocated(boolean val) |
void |
setDistributedJoins(boolean val) |
void |
setEnforceJoinOrder(boolean val) |
void |
setLazy(boolean val) |
void |
setPassword(String passwd) |
void |
setReplicatedOnly(boolean val) |
void |
setSchema(String schema) |
void |
setSkipReducerOnUpdate(boolean val) |
void |
setSocketReceiveBuffer(int size) |
void |
setSocketSendBuffer(int size) |
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 |
setUrl(String url) |
void |
setUsername(String name) |
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 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 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 ConnectionPropertiespublic void init(String url, Properties props) throws SQLException
url - URL connection.props - Environment properties.SQLException - On error.public DriverPropertyInfo[] getDriverPropertyInfo()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.6.0 Release Date : July 10 2018