code: public final void close () throws IOException {
  
          LOGGER.info("Closing was requested.");
  
          for (Connection c : connections) {
              c.close();
          }
  
          connections.clear();
  
          // stop session task thread
          factory.closedSession(this);
          executor.shutdown();
      }
docs: Closes this session instances with all opened connections.
  
  @throws IOException if an I/O error occurs.