Пример #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;
 }