Package org.kiwiproject.dropwizard.jdbi2
Class Jdbi2Builders
- java.lang.Object
-
- org.kiwiproject.dropwizard.jdbi2.Jdbi2Builders
-
public class Jdbi2Builders extends Object
Utilities for building Dropwizard-managedDBIinstances.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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_HEALTH_CHECK_NAME
-
Constructor Summary
Constructors Constructor Description Jdbi2Builders()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.skife.jdbi.v2.DBIbuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory)Build a Dropwizard-managedDBIinstance with metrics and health check given anEnvironmentandPooledDataSourceFactory.static org.skife.jdbi.v2.DBIbuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource)Build a Dropwizard-managedDBIinstance with metrics and health check given anEnvironment,PooledDataSourceFactory, andManagedDataSource.static org.skife.jdbi.v2.DBIbuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, io.dropwizard.db.ManagedDataSource dataSource, String healthCheckName)Build a Dropwizard-managedDBIinstance with metrics and health check given anEnvironment,PooledDataSourceFactory,ManagedDataSource, and name to give to the health check.static org.skife.jdbi.v2.DBIbuildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory, String healthCheckName)Build a Dropwizard-managedDBIinstance with metrics and health check given anEnvironment,PooledDataSourceFactory, and name to give to the health check.
-
-
-
Field Detail
-
DEFAULT_HEALTH_CHECK_NAME
public static final String DEFAULT_HEALTH_CHECK_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildManagedJdbi
public static org.skife.jdbi.v2.DBI buildManagedJdbi(io.dropwizard.setup.Environment environment, io.dropwizard.db.PooledDataSourceFactory dataSourceFactory)Build a Dropwizard-managedDBIinstance with metrics and health check given anEnvironmentandPooledDataSourceFactory.- Parameters:
environment- the Dropwizard environmentdataSourceFactory- 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-managedDBIinstance with metrics and health check given anEnvironment,PooledDataSourceFactory, and name to give to the health check.- Parameters:
environment- the Dropwizard environmentdataSourceFactory- the data source factoryhealthCheckName- 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-managedDBIinstance with metrics and health check given anEnvironment,PooledDataSourceFactory, andManagedDataSource.- Parameters:
environment- the Dropwizard environmentdataSourceFactory- the data source factorydataSource- 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-managedDBIinstance with metrics and health check given anEnvironment,PooledDataSourceFactory,ManagedDataSource, and name to give to the health check.- Parameters:
environment- the Dropwizard environmentdataSourceFactory- the data source factorydataSource- the data sourcehealthCheckName- the name to give the health check- Returns:
- new DBI instance
-
-