class SessionPool {

  public SessionDataSetWrapper executeQueryStatement(String sql)
      throws IoTDBConnectionException, StatementExecutionException {
    for (int i = 0; i < RETRY; i++) {
      Session session = getSession();
      try {
        SessionDataSet resp = session.executeQueryStatement(sql);
        SessionDataSetWrapper wrapper = new SessionDataSetWrapper(resp, session, this);
        occupy(session);
        return wrapper;
      } catch (IoTDBConnectionException e) {
        // TException means the connection is broken, remove it and get a new one.
        cleanSessionAndMayThrowConnectionException(session, i, e);
      } catch (StatementExecutionException e) {
        putBack(session);
        throw e;
      }
    }
    // never go here
    return null;
  }

  public  SessionPool(String ip, int port, String user, String password, int maxSize);
  public  SessionPool(String ip, int port, String user, String password, int maxSize,
      boolean enableCompression);
  @SuppressWarnings("squid:S107") public  SessionPool(String ip, int port, String user, String password, int maxSize, int fetchSize,
      long timeout, boolean enableCompression);

}