jahiadbpoolservice.java

来自「java 写的一个新闻发布系统」· Java 代码 · 共 94 行

JAVA
94
字号
////  JahiaDBPoolService//  EV      31.10.2000////  initConnectionPool//  getConnection//  freeConnection//package org.jahia.services.database;import org.jahia.utils.*;           // JahiaConsoleimport org.jahia.settings.*;        // JahiaPrivateSettingsimport org.jahia.services.*;        // JahiaServiceimport java.sql.*;                      // Statement, ResultSetpublic abstract class JahiaDBPoolService extends JahiaService {   /***    * getConnection    * EV    31.10.2000    * EV    13.12.2000  New Khue Version !!    *    */    public abstract Connection getConnection(int debugID) throws SQLException;   /***    * getConnection    * the debugID is 0 not used in this case    *    * EV    31.10.2000    * EV    13.12.2000  New Khue Version !!    *    */    public abstract Connection getConnection()    throws SQLException;   /***    * freeConnection    * EV    31.10.2000    * EV    13.12.2000  New Khue Version !!    *    */    public abstract void freeConnection( Connection connexion ) throws SQLException;    /**     * getNbFreeConnections     * NK Return the number of available connection     * NK 13.12.2000     */    public abstract int getNbFreeConnections();    /**     * Returns the configured minimum size of the connection pool     * @return an integer representing the minimum size of the pool as     * configured via the constructor     */    public abstract int getMinConnections();    /**     * Returns the configured maximum size of the connection pool     * @return an integer representing the maximum size of the pool as configured     * via the constructor     */    public abstract int getMaxConnections();    /**     * Returns the number of connections managed by this pool that are not     * available (ie are busy handling SQL queries)     * @return an integer representing the number of busy queries     */    public abstract int getBusyConnections();    /**     * Returns the number of connections both in the busy state and in     * the available pool. Basically this returns the number of connections     * to the database that are handled by this connection pool at the     * current time     * @return an integer representing the sum of the available pool and     * the currently used connections.     */    public abstract int getTotalConnections();    public abstract int executeUpdate( Statement stmt, String s )throws SQLException;    public abstract ResultSet executeQuery( Statement stmt, String s )throws SQLException;} // end JahiaDBPoolService

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?