public class IgniteJdbcThinDataSource extends Object implements DataSource, Serializable
Constructor and Description |
---|
IgniteJdbcThinDataSource() |
Modifier and Type | Method and Description |
---|---|
String[] |
getAddresses() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String pwd) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
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 |
getURL()
Different application servers us different format (URL & url).
|
String |
getUsername() |
boolean |
isAutoCloseServerCursor() |
boolean |
isCollocated() |
boolean |
isDistributedJoins() |
boolean |
isEnforceJoinOrder() |
boolean |
isLazy() |
boolean |
isReplicatedOnly() |
boolean |
isSkipReducerOnUpdate() |
boolean |
isSslTrustAll()
Gets trust any server certificate flag.
|
boolean |
isTcpNoDelay() |
boolean |
isWrapperFor(Class<?> iface) |
void |
setAddresses(String... addrsStr)
Sets the addresses of the Ignite nodes to connect;
address string format:
host[:portRangeFrom[..portRangeTo]] . |
void |
setAutoCloseServerCursor(boolean autoCloseServerCursor) |
void |
setCollocated(boolean collocated) |
void |
setDistributedJoins(boolean distributedJoins) |
void |
setEnforceJoinOrder(boolean enforceJoinOrder) |
void |
setLazy(boolean lazy) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setPassword(String passwd) |
void |
setReplicatedOnly(boolean replicatedOnly) |
void |
setSchema(String schema) |
void |
setSkipReducerOnUpdate(boolean skipReducerOnUpdate) |
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 tcpNoDelay) |
void |
setUrl(String url) |
void |
setURL(String url)
Different application servers us different format (URL & url).
|
void |
setUsername(String name) |
<T> T |
unwrap(Class<T> iface) |
public Connection getConnection() throws SQLException
getConnection
in interface DataSource
SQLException
public Connection getConnection(String username, String pwd) throws SQLException
getConnection
in interface DataSource
SQLException
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface CommonDataSource
SQLException
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface CommonDataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface CommonDataSource
SQLException
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface CommonDataSource
SQLFeatureNotSupportedException
public String getURL()
public void setURL(String url) throws SQLException
url
- Connection URL.SQLException
- On error whrn URL is invalid.public String[] getAddresses()
public void setAddresses(String... addrsStr) throws SQLException
host[:portRangeFrom[..portRangeTo]]
.
Examples:
addrsStr
- Ignite nodes addresses.SQLException
- On invalid addresses.public String getSchema()
public void setSchema(String schema)
schema
- Schema name of the connection.public String getUrl()
public void setUrl(String url) throws SQLException
url
- The URL of the connection.SQLException
- On invalid URL.public boolean isDistributedJoins()
public void setDistributedJoins(boolean distributedJoins)
distributedJoins
- Distributed joins flag.public boolean isEnforceJoinOrder()
public void setEnforceJoinOrder(boolean enforceJoinOrder)
enforceJoinOrder
- Enforce join order flag.public boolean isCollocated()
public void setCollocated(boolean collocated)
collocated
- Collocated flag.public boolean isReplicatedOnly()
public void setReplicatedOnly(boolean replicatedOnly)
replicatedOnly
- Replicated only flag.public boolean isAutoCloseServerCursor()
public void setAutoCloseServerCursor(boolean autoCloseServerCursor)
autoCloseServerCursor
- Auto close server cursors flag.public int getSocketSendBuffer()
public void setSocketSendBuffer(int size) throws SQLException
size
- Socket send buffer size.SQLException
- On error.public int getSocketReceiveBuffer()
public void setSocketReceiveBuffer(int size) throws SQLException
size
- Socket receive buffer size.SQLException
- On error.public boolean isTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay
- TCP no delay flag.public boolean isLazy()
public void setLazy(boolean lazy)
lazy
- Lazy query execution flag.public boolean isSkipReducerOnUpdate()
public void setSkipReducerOnUpdate(boolean skipReducerOnUpdate)
skipReducerOnUpdate
- Skip reducer on update flag.public String getSslMode()
setSslMode(String).
public void setSslMode(String mode)
"require"
SSL context must be configured.
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"
mode
- SSL mode.public String getSslProtocol()
public void setSslProtocol(String sslProtocol)
See more at JSSE Reference Guide.
sslProtocol
- SSL protocol name.public String getSslKeyAlgorithm()
public void setSslKeyAlgorithm(String keyAlgorithm)
See more at JSSE Reference Guide.
keyAlgorithm
- Key algorithm name.public String getSslClientCertificateKeyStoreUrl()
public void setSslClientCertificateKeyStoreUrl(String url)
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.url
- Client certificate KeyStore URL.public String getSslClientCertificateKeyStorePassword()
public void setSslClientCertificateKeyStorePassword(String passwd)
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.passwd
- Client certificate KeyStore password.public String getSslClientCertificateKeyStoreType()
public void setSslClientCertificateKeyStoreType(String ksType)
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.
ksType
- Client certificate KeyStore type.public String getSslTrustCertificateKeyStoreUrl()
public void setSslTrustCertificateKeyStoreUrl(String url)
setSslTrustCertificateKeyStoreUrl(String)
, setSslTrustAll(boolean)
properties must be set.
In case 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.url
- Trusted certificate KeyStore URL.public String getSslTrustCertificateKeyStorePassword()
public void setSslTrustCertificateKeyStorePassword(String passwd)
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.passwd
- Trusted certificate KeyStore password.public String getSslTrustCertificateKeyStoreType()
public void setSslTrustCertificateKeyStoreType(String ksType)
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.ksType
- Trusted certificate KeyStore type.public boolean isSslTrustAll()
public 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.
trustAll
- Trust all certificates flag.public String getSslFactory()
public void setSslFactory(String sslFactory)
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.sslFactory
- Custom class name that implements Factory<SSLSocketFactory>.public void setUsername(String name)
name
- User name to authentication.public String getUsername()
public void setPassword(String passwd)
passwd
- User's password.public String getPassword()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019