@FunctionalInterface public interface ConnectionFactory extends ExceptionConsumer<IDbTask>
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
accept(IDbTask task)
Performs this operation on the given arguments.
|
Connection |
getConnection() |
static ConnectionFactory |
of(DataSource ds) |
static ConnectionFactory |
of(String url,
Properties info) |
static ConnectionFactory |
of(String url,
String user,
String password) |
default DataSource |
toDataSource() |
acceptThen, acceptWithCatchAny, acceptWithThrowAny, andThen, toBiConsumerConnection getConnection() throws SQLException
SQLExceptionstatic ConnectionFactory of(String url, String user, String password)
static ConnectionFactory of(String url, Properties info)
static ConnectionFactory of(DataSource ds)
default DataSource toDataSource()
default void accept(IDbTask task)
ExceptionConsumeraccept 在接口中 ExceptionConsumer<IDbTask>task - the first input argumentCopyright © 2022. All rights reserved.