接口 ConnectionHandle
- 所有已知实现类:
SimpleConnectionHandle
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface ConnectionHandle
Simple interface to be implemented by handles for a JDBC Connection. Used by JpaDialect, for example.- 从以下版本开始:
- 1.1
- 作者:
- Juergen Hoeller
- 另请参阅:
SimpleConnectionHandle
,ConnectionHolder
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 Connection
getConnection()
Fetch the JDBC Connection that this handle refers to.default void
releaseConnection(Connection con)
Release the JDBC Connection that this handle refers to.
方法详细资料
getConnection
Connection getConnection()
Fetch the JDBC Connection that this handle refers to.
releaseConnection
default void releaseConnection(Connection con)
Release the JDBC Connection that this handle refers to.The default implementation is empty, assuming that the lifecycle of the connection is managed externally.
- 参数:
con
- the JDBC Connection to release