Class ManagedPooledDataSource

java.lang.Object
com.zaxxer.hikari.HikariConfig
com.zaxxer.hikari.HikariDataSource
io.dropwizard.db.ManagedPooledDataSource
All Implemented Interfaces:
com.zaxxer.hikari.HikariConfigMXBean, io.dropwizard.db.ManagedDataSource, io.dropwizard.lifecycle.Managed, java.io.Closeable, java.lang.AutoCloseable, java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

public class ManagedPooledDataSource
extends com.zaxxer.hikari.HikariDataSource
implements io.dropwizard.db.ManagedDataSource
  • Constructor Summary

    Constructors
    Constructor Description
    ManagedPooledDataSource​(com.zaxxer.hikari.HikariConfig config)  
    ManagedPooledDataSource​(com.zaxxer.hikari.HikariConfig config, com.codahale.metrics.MetricRegistry metricRegistry)
    Create a new data source with the given connection pool configuration.
  • Method Summary

    Modifier and Type Method Description
    java.util.logging.Logger getParentLogger()  
    void start()  
    void stop()  

    Methods inherited from class com.zaxxer.hikari.HikariDataSource

    close, evictConnection, getConnection, getConnection, getHikariConfigMXBean, getHikariPoolMXBean, getLoginTimeout, getLogWriter, isClosed, isRunning, isWrapperFor, setHealthCheckRegistry, setLoginTimeout, setLogWriter, setMetricRegistry, setMetricsTrackerFactory, toString, unwrap

    Methods inherited from class com.zaxxer.hikari.HikariConfig

    addDataSourceProperty, addHealthCheckProperty, copyStateTo, getCatalog, getConnectionInitSql, getConnectionTestQuery, getConnectionTimeout, getDataSource, getDataSourceClassName, getDataSourceJNDI, getDataSourceProperties, getDriverClassName, getExceptionOverrideClassName, getHealthCheckProperties, getHealthCheckRegistry, getIdleTimeout, getInitializationFailTimeout, getJdbcUrl, getKeepaliveTime, getLeakDetectionThreshold, getMaximumPoolSize, getMaxLifetime, getMetricRegistry, getMetricsTrackerFactory, getMinimumIdle, getPassword, getPoolName, getScheduledExecutor, getSchema, getThreadFactory, getTransactionIsolation, getUsername, getValidationTimeout, isAllowPoolSuspension, isAutoCommit, isIsolateInternalQueries, isReadOnly, isRegisterMbeans, setAllowPoolSuspension, setAutoCommit, setCatalog, setConnectionInitSql, setConnectionTestQuery, setConnectionTimeout, setDataSource, setDataSourceClassName, setDataSourceJNDI, setDataSourceProperties, setDriverClassName, setExceptionOverrideClassName, setHealthCheckProperties, setIdleTimeout, setInitializationFailTimeout, setIsolateInternalQueries, setJdbcUrl, setKeepaliveTime, setLeakDetectionThreshold, setMaximumPoolSize, setMaxLifetime, setMinimumIdle, setPassword, setPoolName, setReadOnly, setRegisterMbeans, setScheduledExecutor, setSchema, setThreadFactory, setTransactionIsolation, setUsername, setValidationTimeout, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javax.sql.CommonDataSource

    createShardingKeyBuilder

    Methods inherited from interface javax.sql.DataSource

    createConnectionBuilder, getConnection, getConnection, getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter

    Methods inherited from interface java.sql.Wrapper

    isWrapperFor, unwrap
  • Constructor Details

    • ManagedPooledDataSource

      public ManagedPooledDataSource​(com.zaxxer.hikari.HikariConfig config, com.codahale.metrics.MetricRegistry metricRegistry)
      Create a new data source with the given connection pool configuration.
      Parameters:
      config - the connection pool configuration
      metricRegistry - the metric registry used to register the connection pool metrics.
    • ManagedPooledDataSource

      public ManagedPooledDataSource​(com.zaxxer.hikari.HikariConfig config)
  • Method Details

    • getParentLogger

      public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
      Specified by:
      getParentLogger in interface javax.sql.CommonDataSource
      Overrides:
      getParentLogger in class com.zaxxer.hikari.HikariDataSource
      Throws:
      java.sql.SQLFeatureNotSupportedException
    • start

      public void start() throws java.lang.Exception
      Specified by:
      start in interface io.dropwizard.lifecycle.Managed
      Throws:
      java.lang.Exception
    • stop

      public void stop() throws java.lang.Exception
      Specified by:
      stop in interface io.dropwizard.lifecycle.Managed
      Throws:
      java.lang.Exception