Interface JdbcConnectionFactory
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
GenericJdbcConnectionFactory,HiveJdbcConnectionFactory,SnowflakeConnectionFactory
public interface JdbcConnectionFactory extends AutoCloseable
Factory abstracts creation of JDBC connection to database.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()ConnectiongetConnection(CredentialsProvider credentialsProvider)Retrieves database connection for a database type.
-
-
-
Method Detail
-
getConnection
Connection getConnection(CredentialsProvider credentialsProvider) throws Exception
Retrieves database connection for a database type.- Parameters:
credentialsProvider- jdbc user and password provider.- Returns:
- JDBC connection. See
Connection. - Throws:
Exception
-
close
default void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-