Class JdbiFactory


  • public class JdbiFactory
    extends Object
    • Constructor Detail

      • JdbiFactory

        public JdbiFactory()
      • JdbiFactory

        public JdbiFactory​(com.codahale.metrics.jdbi3.strategies.StatementNameStrategy nameStrategy)
    • Method Detail

      • buildSQLLogger

        protected com.codahale.metrics.jdbi3.InstrumentedSqlLogger buildSQLLogger​(com.codahale.metrics.MetricRegistry metricRegistry,
                                                                                  com.codahale.metrics.jdbi3.strategies.StatementNameStrategy nameStrategy)
        This creates a default InstrumentedSqlLogger instance with the specified MetricRegistry and nameStrategy. This can be overridden if required.
        Parameters:
        metricRegistry - The MetricRegistry to send to the InstrumentedSqlLogger.
        nameStrategy - The StatementNameStrategy to send to the InstrumentedSqlLogger.
        Returns:
        The created InstrumentedSqlLogger.
        Since:
        2.0
      • newInstance

        protected org.jdbi.v3.core.Jdbi newInstance​(ManagedDataSource dataSource)
        This creates a vanilla Jdbi instance based on the specified data source; this can be overridden if required
        Parameters:
        dataSource -
        Returns:
      • configure

        protected void configure​(org.jdbi.v3.core.Jdbi jdbi)
        Overridable function to allow extra customization of the created Jdbi instance.

        If this is overridden it is strongly recommend that super.configure(jdbi, configuration) is invoked before any other changes are made if you intend to use the default as a base so that the customized settings will supersede the defaults

        Parameters:
        jdbi -