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

    activeConns = pool.getAllObject();
    return activeConns;
  }
예제 #3
0
 @Override
 public void close() throws Exception {
   pool.shutDown();
   closed = true;
 }