📄 connectionpool.java
字号:
/*
* Copyright(C) 2008, NTT AT Co., Ltd.
* Project: AWGStar
*
* Notes:
* N/A
*
* Record of change:
* Date Version Name Content
* 2008/12/15 1.0 TriNT First create
*/
package jp.co.ntt.awgview.server.dao;
/**
* Class name : ConnectionPool <BR>
* Package : jp.co.nttat.awgstar.server.dao <BR>
* Description: Connection Pool interface <BR>
*
* @author : AI&T
* @version : 1.0
*/
import java.sql.Connection;
public interface ConnectionPool extends Runnable {
/***
* To create new instance of ConnectionPool
*
* @param dbName
* @param dbHostName
* @param dbPortNumber
* @param dbUser
* @param dbPass
* @param initialConnections
* @param waitIfBusy
* @throws Exception
*/
public void initInstance(String dbName, String dbHostName, int dbPortNumber, String dbUser, String dbPass, int initialConnections,
boolean waitIfBusy) throws Exception;
/**
* Return connection to dbType
*
* @return DBConnection
* @throws DatabaseException
* error
*/
public DBConnection getConnection() throws Exception;
/**
* Free connection
*
* @param connection
* Connection
*/
public void free(Connection connection);
/**
* Close all the connections. Use with caution: be sure no connections are
* in use before calling. Note that you are not <I>required</I> to call this
* when done with a ConnectionPool, since connections are guaranteed to be
* closed when garbage collected. But this method gives more control
* regarding when the connections are closed.
*/
public void closeAllConnections();
public boolean isConnected();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -