001package org.avaje.datasource; 002 003import javax.sql.DataSource; 004 005/** 006 * DataSource pool API. 007 */ 008public interface DataSourcePool extends DataSource { 009 010 /** 011 * Return the dataSource name. 012 */ 013 String getName(); 014 015 /** 016 * Return true if the pool defaults to using autocommit. 017 */ 018 boolean isAutoCommit(); 019 020 /** 021 * Shutdown the pool with the option to deregister the driver. 022 */ 023 void shutdown(boolean deregisterDriver); 024 025 /** 026 * Return the current status of the connection pool. 027 * <p> 028 * This is cheaper than getStatistics() in that it just the counts of free, busy, 029 * wait etc and does not included times (total connection time etc). 030 * </p> 031 * <p> 032 * If you pass reset = true then the counters are reset. 033 * </p> 034 */ 035 PoolStatus getStatus(boolean reset); 036 037 /** 038 * Return the aggregated execution statistics collected on all the connections in the pool. 039 * <p> 040 * If reset is set to true the counters are reset once the statistics have been collected. 041 * </p> 042 */ 043 PoolStatistics getStatistics(boolean reset); 044 045}