Package com.hazelcast.config
Class SqlConfig
- java.lang.Object
-
- com.hazelcast.config.SqlConfig
-
public class SqlConfig extends java.lang.Object
SQL service configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_STATEMENT_TIMEOUT_MILLIS
Default timeout in milliseconds that is applied to statements without explicit timeout.
-
Constructor Summary
Constructors Constructor Description SqlConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getStatementTimeoutMillis()
Gets the timeout in milliseconds that is applied to statements without an explicit timeout.int
hashCode()
boolean
isCatalogPersistenceEnabled()
Returnstrue
if persistence is enabled for SQL Catalog.SqlConfig
setCatalogPersistenceEnabled(boolean catalogPersistenceEnabled)
Sets whether SQL Catalog persistence is enabled for the node.SqlConfig
setStatementTimeoutMillis(long statementTimeoutMillis)
Sets the timeout in milliseconds that is applied to statements without an explicit timeout.java.lang.String
toString()
-
-
-
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
-
-
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()
Returnstrue
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-