Class IgniteJdbcThinDataSource

    • Constructor Detail

      • IgniteJdbcThinDataSource

        public IgniteJdbcThinDataSource()
    • Method Detail

      • getURL

        public String getURL()
        Different application servers us different format (URL & url).
        Returns:
        Connection URL.
      • setURL

        public void setURL​(String url)
                    throws SQLException
        Different application servers us different format (URL & url).
        Parameters:
        url - Connection URL.
        Throws:
        SQLException - On error whrn URL is invalid.
      • getAddresses

        public String[] getAddresses()
        Returns:
        Ignite nodes addresses.
      • setAddresses

        public void setAddresses​(String... addrsStr)
                          throws SQLException
        Sets the addresses of the Ignite nodes to connect; address string format: host[:portRangeFrom[..portRangeTo]]. Examples:
        • "127.0.0.1"
        • "127.0.0.1:10800"
        • "127.0.0.1:10800..10810"
        • "mynode0.mydomain.org:10800..10810", "mynode1.mydomain.org:10800..10810", "127.0.0.1:10800"
          Parameters:
          addrsStr - Ignite nodes addresses.
          Throws:
          SQLException - On invalid addresses.
        • getSchema

          public String getSchema()
          Returns:
          Schema name of the connection.
        • setSchema

          public void setSchema​(String schema)
          Parameters:
          schema - Schema name of the connection.
        • getUrl

          public String getUrl()
          Returns:
          The URL of the connection.
        • isDistributedJoins

          public boolean isDistributedJoins()
          Returns:
          Distributed joins flag.
        • setDistributedJoins

          public void setDistributedJoins​(boolean distributedJoins)
          Parameters:
          distributedJoins - Distributed joins flag.
        • isEnforceJoinOrder

          public boolean isEnforceJoinOrder()
          Returns:
          Enforce join order flag.
        • setEnforceJoinOrder

          public void setEnforceJoinOrder​(boolean enforceJoinOrder)
          Parameters:
          enforceJoinOrder - Enforce join order flag.
        • isCollocated

          public boolean isCollocated()
          Returns:
          Collocated flag.
        • setCollocated

          public void setCollocated​(boolean collocated)
          Parameters:
          collocated - Collocated flag.
        • isReplicatedOnly

          public boolean isReplicatedOnly()
          Returns:
          Replicated only flag.
        • setReplicatedOnly

          public void setReplicatedOnly​(boolean replicatedOnly)
          Parameters:
          replicatedOnly - Replicated only flag.
        • isAutoCloseServerCursor

          public boolean isAutoCloseServerCursor()
          Returns:
          Auto close server cursors flag.
        • setAutoCloseServerCursor

          public void setAutoCloseServerCursor​(boolean autoCloseServerCursor)
          Parameters:
          autoCloseServerCursor - Auto close server cursors flag.
        • getSocketSendBuffer

          public int getSocketSendBuffer()
          Returns:
          Socket send buffer size.
        • setSocketSendBuffer

          public void setSocketSendBuffer​(int size)
                                   throws SQLException
          Parameters:
          size - Socket send buffer size.
          Throws:
          SQLException - On error.
        • getSocketReceiveBuffer

          public int getSocketReceiveBuffer()
          Returns:
          Socket receive buffer size.
        • setSocketReceiveBuffer

          public void setSocketReceiveBuffer​(int size)
                                      throws SQLException
          Parameters:
          size - Socket receive buffer size.
          Throws:
          SQLException - On error.
        • isTcpNoDelay

          public boolean isTcpNoDelay()
          Returns:
          TCP no delay flag.
        • setTcpNoDelay

          public void setTcpNoDelay​(boolean tcpNoDelay)
          Parameters:
          tcpNoDelay - TCP no delay flag.
        • isLazy

          public boolean isLazy()
          Returns:
          Lazy query execution flag.
        • setLazy

          public void setLazy​(boolean lazy)
          Parameters:
          lazy - Lazy query execution flag.
        • isSkipReducerOnUpdate

          public boolean isSkipReducerOnUpdate()
          Returns:
          Skip reducer on update flag.
        • setSkipReducerOnUpdate

          public void setSkipReducerOnUpdate​(boolean skipReducerOnUpdate)
          Parameters:
          skipReducerOnUpdate - Skip reducer on update flag.
        • getSslMode

          public String getSslMode()
          Gets SSL connection mode.
          Returns:
          Use SSL flag.
        • setSslMode

          public void setSslMode​(String mode)
          Use SSL connection to Ignite node. In case set to "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"
          Parameters:
          mode - SSL mode.
        • getSslProtocol

          public String getSslProtocol()
          Gets protocol for secure transport.
          Returns:
          SSL protocol name.
        • setSslProtocol

          public void setSslProtocol​(String sslProtocol)
          Sets protocol for secure transport. If not specified, TLS protocol will be used. Protocols implementations supplied by JSEE: SSLv3 (SSL), TLSv1 (TLS), TLSv1.1, TLSv1.2

          See more at JSSE Reference Guide.

          Parameters:
          sslProtocol - SSL protocol name.
        • getCipherSuites

          public String getCipherSuites()
          Gets cipher suites.
          Returns:
          SSL cipher suites.
        • setCipherSuites

          public void setCipherSuites​(String cipherSuites)
          Override default cipher suites.

          See more at JSSE Reference Guide.

          Parameters:
          cipherSuites - SSL cipher suites.
        • getSslKeyAlgorithm

          public String getSslKeyAlgorithm()
          Gets algorithm that will be used to create a key manager.
          Returns:
          Key manager algorithm.
        • setSslKeyAlgorithm

          public void setSslKeyAlgorithm​(String keyAlgorithm)
          Sets key manager algorithm that will be used to create a key manager. Notice that in most cased default value suites well, however, on Android platform this value need to be set to X509. Algorithms implementations supplied by JSEE: PKIX (X509 or SunPKIX), SunX509

          See more at JSSE Reference Guide.

          Parameters:
          keyAlgorithm - Key algorithm name.
        • getSslClientCertificateKeyStoreUrl

          public String getSslClientCertificateKeyStoreUrl()
          Gets the key store URL.
          Returns:
          Client certificate KeyStore URL.
        • setSslClientCertificateKeyStoreUrl

          public void setSslClientCertificateKeyStoreUrl​(String url)
          Sets path to the key store file. This is a mandatory parameter since ssl context could not be initialized without key manager. In case 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.
          Parameters:
          url - Client certificate KeyStore URL.
        • getSslClientCertificateKeyStorePassword

          public String getSslClientCertificateKeyStorePassword()
          Gets key store password.
          Returns:
          Client certificate KeyStore password.
        • setSslClientCertificateKeyStorePassword

          public void setSslClientCertificateKeyStorePassword​(String passwd)
          Sets key store password. In case 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.
          Parameters:
          passwd - Client certificate KeyStore password.
        • getSslClientCertificateKeyStoreType

          public String getSslClientCertificateKeyStoreType()
          Gets key store type used for context creation.
          Returns:
          Client certificate KeyStore type.
        • setSslClientCertificateKeyStoreType

          public void setSslClientCertificateKeyStoreType​(String ksType)
          Sets key store type used in context initialization. In case 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.

          Parameters:
          ksType - Client certificate KeyStore type.
        • getSslTrustCertificateKeyStoreUrl

          public String getSslTrustCertificateKeyStoreUrl()
          Gets the trust store URL.
          Returns:
          Trusted certificate KeyStore URL.
        • setSslTrustCertificateKeyStoreUrl

          public void setSslTrustCertificateKeyStoreUrl​(String url)
          Sets path to the trust store file. This is an optional parameter, however one of the 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.
          Parameters:
          url - Trusted certificate KeyStore URL.
        • getSslTrustCertificateKeyStorePassword

          public String getSslTrustCertificateKeyStorePassword()
          Gets trust store password.
          Returns:
          Trusted certificate KeyStore password.
        • setSslTrustCertificateKeyStorePassword

          public void setSslTrustCertificateKeyStorePassword​(String passwd)
          Sets trust store password. In case 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.
          Parameters:
          passwd - Trusted certificate KeyStore password.
        • getSslTrustCertificateKeyStoreType

          public String getSslTrustCertificateKeyStoreType()
          Gets trust store type.
          Returns:
          Trusted certificate KeyStore type.
        • setSslTrustCertificateKeyStoreType

          public void setSslTrustCertificateKeyStoreType​(String ksType)
          Sets trust store type. In case 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.
          Parameters:
          ksType - Trusted certificate KeyStore type.
        • isSslTrustAll

          public boolean isSslTrustAll()
          Gets trust any server certificate flag.
          Returns:
          Trust all certificates flag.
        • setSslTrustAll

          public void setSslTrustAll​(boolean trustAll)
          Sets to 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.

          Parameters:
          trustAll - Trust all certificates flag.
        • getSslFactory

          public String getSslFactory()
          Gets the class name of the custom implementation of the Factory<SSLSocketFactory>.
          Returns:
          Custom class name that implements Factory<SSLSocketFactory>.
        • setSslFactory

          public void setSslFactory​(String sslFactory)
          Sets the class name of the custom implementation of the Factory<SSLSocketFactory>. If 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.
          Parameters:
          sslFactory - Custom class name that implements Factory<SSLSocketFactory>.
        • setUsername

          public void setUsername​(String name)
          Parameters:
          name - User name to authentication.
        • getUsername

          public String getUsername()
          Returns:
          User name to authentication.
        • setPassword

          public void setPassword​(String passwd)
          Parameters:
          passwd - User's password.
        • getPassword

          public String getPassword()
          Returns:
          User's password.