Interface Quidem.ConnectionFactory

Enclosing class:
Quidem

public static interface Quidem.ConnectionFactory
Creates a connection for a given name.

It is kind of a directory service.

Caller must close the connection.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Connection
    connect(String name, boolean reference)
    Creates a connection to the named database or reference database.
    Returns a supplier of connections to a particular database.
  • Method Details

    • connect

      @Nullable Connection connect(String name, boolean reference) throws Exception
      Creates a connection to the named database or reference database.

      Returns null if the database is not known (except UnsupportedConnectionFactory.

      Parameters:
      name - Name of the database
      reference - Whether we require a real connection or a reference connection
      Throws:
      Exception
    • supplier

      default Supplier<Connection> supplier(String name)
      Returns a supplier of connections to a particular database.
      Parameters:
      name - Database name