code: public final int getActiveConnectionCount() {
  
        if(!isActive) {
           return 0;
        }
  
        int count = 0;
        for(ConnectionPoolConnection conn : connections) {
           if(conn.state.get() != ConnectionPoolConnection.STATE_AVAILABLE) {
              count++;
           }
        }
  
        return count;
     }
docs: Gets the number of active connections.
  @return The number of active connections.