Class Jdbi2Builders


  • public class Jdbi2Builders
    extends Object
    Utilities for building Dropwizard-managed DBI instances.

    NOTE: This class is for JDBI version 2, if you would like to upgrade to JDBI version 3, there is an equivalent to this class in org.kiwiproject.dropwizard.jdbi3.

    • Constructor Summary

      Constructors 
      Constructor Description
      Jdbi2Builders()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory)
      Build a Dropwizard-managed DBI instance with metrics and health check given an Environment and PooledDataSourceFactory.
      static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource)
      Build a Dropwizard-managed DBI instance with metrics and health check given an Environment, PooledDataSourceFactory, and ManagedDataSource.
      static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, String healthCheckName)
      Build a Dropwizard-managed DBI instance with metrics and health check given an Environment, PooledDataSourceFactory, ManagedDataSource, and name to give to the health check.
      static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, String healthCheckName)
      Build a Dropwizard-managed DBI instance with metrics and health check given an Environment, PooledDataSourceFactory, and name to give to the health check.
    • Constructor Detail

      • Jdbi2Builders

        public Jdbi2Builders()
    • Method Detail

      • buildManagedJdbi

        public static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory)
        Build a Dropwizard-managed DBI instance with metrics and health check given an Environment and PooledDataSourceFactory.
        Parameters:
        environment - the Dropwizard environment
        dataSourceFactory - the data source factory
        Returns:
        new DBI instance
      • buildManagedJdbi

        public static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             String healthCheckName)
        Build a Dropwizard-managed DBI instance with metrics and health check given an Environment, PooledDataSourceFactory, and name to give to the health check.
        Parameters:
        environment - the Dropwizard environment
        dataSourceFactory - the data source factory
        healthCheckName - the name to give the health check
        Returns:
        new DBI instance
      • buildManagedJdbi

        public static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             io.dropwizard.db.ManagedDataSource dataSource)
        Build a Dropwizard-managed DBI instance with metrics and health check given an Environment, PooledDataSourceFactory, and ManagedDataSource.
        Parameters:
        environment - the Dropwizard environment
        dataSourceFactory - the data source factory
        dataSource - the data source
        Returns:
        new DBI instance
      • buildManagedJdbi

        public static org.skife.jdbi.v2.DBI buildManagedJdbi​(io.dropwizard.setup.Environment environment,
                                                             io.dropwizard.db.PooledDataSourceFactory dataSourceFactory,
                                                             io.dropwizard.db.ManagedDataSource dataSource,
                                                             String healthCheckName)
        Build a Dropwizard-managed DBI instance with metrics and health check given an Environment, PooledDataSourceFactory, ManagedDataSource, and name to give to the health check.
        Parameters:
        environment - the Dropwizard environment
        dataSourceFactory - the data source factory
        dataSource - the data source
        healthCheckName - the name to give the health check
        Returns:
        new DBI instance