Class JasyncPostgreSQLClientFactory

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    @Factory
    @Requires(classes=com.github.jasync.sql.db.postgresql.PostgreSQLConnectionBuilder.class)
    public class JasyncPostgreSQLClientFactory
    extends java.lang.Object
    implements java.lang.AutoCloseable
    The Factory for creating Reactive Postgres client.
    • Constructor Detail

      • JasyncPostgreSQLClientFactory

        public JasyncPostgreSQLClientFactory​(JasyncPoolConfiguration jasyncPoolConfiguration)
        Create the factory with given Pool configuration.
        Parameters:
        jasyncPoolConfiguration - The Reactive Postgres configurations
    • Method Detail

      • client

        @Singleton
        public com.github.jasync.sql.db.Connection client()
        Create a connection pool to the database configured with the JasyncPoolConfiguration.
        Returns:
        client A pool of connections.
      • close

        @PreDestroy
        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable