Interface Datasource
- All Superinterfaces:
DatasourceMeta
An instance of a Ignition Datasource, which represents a configured connection pool to a database
through JDBC. The datasource maintains knowledge of its current status, and when faulted, will be
re-tested periodically.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelStatement(UUID statementId) Retrieves a connection from the underlying connection pool, or creates a new connection if necessary.Returns the raw configured JDBC connection URL.Returns the driver that this datasource uses to connect to the databaseIf this datasource is FAULTED, this will be the exception that caused it to failbooleanWhether table names should be fully qualified with their schemas.Methods inherited from interface DatasourceMeta
getActiveConnections, getActiveQueries, getDescription, getExtendedStatus, getFailoverMode, getMaxConnections, getName, getProblemDescription, getStatistics, getStatus, getValidationQuery, getVendor
-
Method Details
-
getDriver
JDBCDriver getDriver()Returns the driver that this datasource uses to connect to the database -
getTranslator
DBTranslator getTranslator() -
includeSchemaInTablename
boolean includeSchemaInTablename()Whether table names should be fully qualified with their schemas. -
getConnection
Retrieves a connection from the underlying connection pool, or creates a new connection if necessary. Closing this connection will return it to the pool.- Throws:
SQLException
-
getProblem
Throwable getProblem()If this datasource is FAULTED, this will be the exception that caused it to fail -
cancelStatement
-
getMetrics
DatasourceMetrics getMetrics() -
getConnectUrl
String getConnectUrl()Returns the raw configured JDBC connection URL. -
getFailoverConnection
String getFailoverConnection()- Returns:
- the name of the datasource configured as this connection's failover target, or
nullif none is configured. The failover behavior is governed byDatasourceMeta.getFailoverMode().
-