/** 统计数据源的一些信息 */ public void info() { if (closed) { Log.w(tag, "DataSource is closed."); return; } pool.staticsInfo(); }
/** * 获取当前可用的连接 * * @return 当前可用连接的集合 */ public List<Connection> getAllActiveConns() { List<Connection> activeConns = new ArrayList<>(); if (closed) { return activeConns; } activeConns = pool.getAllObject(); return activeConns; }
@Override public void close() throws Exception { pool.shutDown(); closed = true; }