Class ConnectionStoreManager

java.lang.Object
org.kawanfw.sql.api.server.connectionstore.ConnectionStoreManager

public class ConnectionStoreManager
extends Object
Class that allows to manage the server Connection Store that stores in memory the JDBC Connections of the client users during their session.

Class allows to:

  • Retrieve all the ConnectionKey of the Connection Store.
  • Retrieve the age of JDBC Connection stored in the Connection Store.
  • Remove a JDBC Connection from the Connection Store and release it into the connection pool.
Since:
1.0
Author:
Nicolas de Pomereu
  • Method Details

    • getKeys

      public static Set<ConnectionKey> getKeys()
      Returns the keys of the Connection Store.
      Returns:
      the keys of the Connection Store
    • remove

      public static void remove​(ConnectionKey connectionKey, DatabaseConfigurator databaseConfigurator) throws SQLException
      Removes from the Connection Store a JDBC Connection identified by a ConnectionKey and release it in the connection pool.
      Parameters:
      connectionKey - the key of the Connection Store
      databaseConfigurator - the SQL Configurator
      Throws:
      SQLException - if any SQL Exception
    • size

      public static int size()
      Returns the size of the Connection Store
      Returns:
      the size of the Connection Store