Class SqlConfig


  • public class SqlConfig
    extends java.lang.Object
    SQL service configuration.
    • Field Detail

      • DEFAULT_STATEMENT_TIMEOUT_MILLIS

        public static final int DEFAULT_STATEMENT_TIMEOUT_MILLIS
        Default timeout in milliseconds that is applied to statements without explicit timeout.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SqlConfig

        public SqlConfig()
    • Method Detail

      • getStatementTimeoutMillis

        public long getStatementTimeoutMillis()
        Gets the timeout in milliseconds that is applied to statements without an explicit timeout.
        Returns:
        timeout in milliseconds
      • setStatementTimeoutMillis

        public SqlConfig setStatementTimeoutMillis​(long statementTimeoutMillis)
        Sets the timeout in milliseconds that is applied to statements without an explicit timeout.

        It is possible to set a timeout through the SqlStatement.setTimeoutMillis(long) method. If the statement timeout is not set, then the value of this parameter will be used.

        Zero value means no timeout. Negative values are prohibited.

        Defaults to DEFAULT_STATEMENT_TIMEOUT_MILLIS.

        Parameters:
        statementTimeoutMillis - timeout in milliseconds
        Returns:
        this instance for chaining
        See Also:
        SqlStatement.setTimeoutMillis(long)
      • isCatalogPersistenceEnabled

        public boolean isCatalogPersistenceEnabled()
        Returns true if persistence is enabled for SQL Catalog.
        Returns:
        true if persistence is enabled for SQL Catalog
      • setCatalogPersistenceEnabled

        public SqlConfig setCatalogPersistenceEnabled​(boolean catalogPersistenceEnabled)
        Sets whether SQL Catalog persistence is enabled for the node. With SQL Catalog persistence enabled you can restart the whole cluster without losing schema definition objects (such as MAPPINGs, TYPEs, VIEWs and DATA CONNECTIONs). The feature is implemented on top of the Hot Restart feature of Hazelcast which persists the data to disk. If enabled, you have to also configure Hot Restart. Feature is disabled by default. If you enable this option in open-source, the member will fail to start, you need Enterprise to run it and obtain a license from Hazelcast.
        Parameters:
        catalogPersistenceEnabled - to enable or disable persistence for SQL Catalog
        Returns:
        this config instance
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object