📄 dbconnectionpool.java
字号:
package com.gd.jdbc;
import java.sql.Connection;
import java.sql.SQLException;
public interface DbConnectionPool {
/**
* 设定连接池中存放连接的数目
* @param numConnections
*/
public void setMaxConns(int numConnections);
/**
* 设定打开或者关闭连接池
* @param onOrOff
* @throws Exception
*/
public void setConnWitch(String onOrOff) throws Exception;
/**
* 产生连接池
* @throws SQLException
*/
public void initConnPool() throws SQLException;
/**
* 从连接池中获取连接
* @return
* @throws SQLException
*/
public Connection getConnection() throws SQLException;
/**
* 将连接返回给连接池
* @throws SQLException
*/
public void returnConnection() throws SQLException;
/**
* 销毁连接池
* @throws SQLException
*/
public void destroyConnPool() throws SQLException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -