接口 JdbcConnectionProvider
-
- 所有已知子接口:
XaFacade
- 所有已知实现类:
HiveJdbcConnectionProvider,SimpleJdbcConnectionPoolProviderProxy,SimpleJdbcConnectionProvider,XaFacadeImplAutoLoad
public interface JdbcConnectionProviderJDBC connection provider.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidcloseConnection()Close possible existing connection.ConnectiongetConnection()Get existing connection.ConnectiongetOrEstablishConnection()Get existing connection or establish an new one if there is none.booleanisConnectionValid()Check whether possible existing connection is valid or not throughConnection.isValid(int).ConnectionreestablishConnection()Close possible existing connection and establish an new one.
-
-
-
方法详细资料
-
getConnection
Connection getConnection()
Get existing connection.- 返回:
- existing connection
-
isConnectionValid
boolean isConnectionValid() throws SQLExceptionCheck whether possible existing connection is valid or not throughConnection.isValid(int).- 返回:
- true if existing connection is valid
- 抛出:
SQLException- sql exception throw fromConnection.isValid(int)
-
getOrEstablishConnection
Connection getOrEstablishConnection() throws SQLException, ClassNotFoundException
Get existing connection or establish an new one if there is none.- 返回:
- existing connection or newly established connection
- 抛出:
SQLException- sql exceptionClassNotFoundException- driver class not found
-
closeConnection
void closeConnection()
Close possible existing connection.
-
reestablishConnection
Connection reestablishConnection() throws SQLException, ClassNotFoundException
Close possible existing connection and establish an new one.- 返回:
- newly established connection
- 抛出:
SQLException- sql exceptionClassNotFoundException- driver class not found
-
-