org.apache.tomcat.dbcp.dbcp2

## Interface DataSourceMXBean

- All Known Subinterfaces:
    BasicDataSourceMXBean
  All Known Implementing Classes:
    BasicDataSource, BasicManagedDataSource

      public interface DataSourceMXBean

  Defines the methods that will be made available via JMX.
  Since:
    2.9.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getAbandonedUsageTracking()` See `BasicDataSource.getAbandonedUsageTracking()`.
    `boolean` | `getCacheState()` See `BasicDataSource.getCacheState()`.
    `String[]` | `getConnectionInitSqlsAsArray()` See `BasicDataSource.getConnectionInitSqlsAsArray()`.
    `Boolean` | `getDefaultAutoCommit()` See `BasicDataSource.getDefaultAutoCommit()`.
    `String` | `getDefaultCatalog()` See `BasicDataSource.getDefaultCatalog()`.
    `Boolean` | `getDefaultReadOnly()` See `BasicDataSource.getDefaultReadOnly()`.
    `default String` | `getDefaultSchema()` See `BasicDataSource.getDefaultSchema()`.
    `int` | `getDefaultTransactionIsolation()` See `BasicDataSource.getDefaultTransactionIsolation()`.
    `String[]` | `getDisconnectionSqlCodesAsArray()` See `BasicDataSource.getDisconnectionSqlCodesAsArray()`.
    `String` | `getDriverClassName()` See `BasicDataSource.getDriverClassName()`.
    `Duration` | `getDurationBetweenEvictionRuns()` See `BasicDataSource.getDurationBetweenEvictionRuns()`.
    `boolean` | `getFastFailValidation()` See `BasicDataSource.getFastFailValidation()`.
    `int` | `getInitialSize()` See `BasicDataSource.getInitialSize()`.
    `boolean` | `getLifo()` See `BasicDataSource.getLifo()`.
    `boolean` | `getLogAbandoned()` See `BasicDataSource.getLogAbandoned()`.
    `boolean` | `getLogExpiredConnections()` See `BasicDataSource.getLogExpiredConnections()`.
    `Duration` | `getMaxConnDuration()` See `BasicDataSource.getMaxConnDuration()`.
    `long` | `getMaxConnLifetimeMillis()` Deprecated. Use `getMaxConnDuration()`.
    `int` | `getMaxIdle()` See `BasicDataSource.getMaxIdle()`.
    `int` | `getMaxOpenPreparedStatements()` See `BasicDataSource.getMaxOpenPreparedStatements()`.
    `int` | `getMaxTotal()` See `BasicDataSource.getMaxTotal()`.
    `Duration` | `getMaxWaitDuration()` See `BasicDataSource.getMaxWaitDuration()`.
    `long` | `getMaxWaitMillis()` Deprecated. Use `getMaxWaitDuration()`.
    `Duration` | `getMinEvictableIdleDuration()` See `BasicDataSource.getMinEvictableIdleDuration()`.
    `long` | `getMinEvictableIdleTimeMillis()` Deprecated. Use `getMinEvictableIdleDuration()`.
    `int` | `getMinIdle()` See `BasicDataSource.getMinIdle()`.
    `int` | `getNumActive()` See `BasicDataSource.getNumActive()`.
    `int` | `getNumIdle()` See `BasicDataSource.getNumIdle()`.
    `int` | `getNumTestsPerEvictionRun()` See `BasicDataSource.getNumTestsPerEvictionRun()`.
    `boolean` | `getRemoveAbandonedOnBorrow()` See `BasicDataSource.getRemoveAbandonedOnBorrow()`.
    `boolean` | `getRemoveAbandonedOnMaintenance()` See `BasicDataSource.getRemoveAbandonedOnMaintenance()`.
    `int` | `getRemoveAbandonedTimeout()` Deprecated. Use `getRemoveAbandonedTimeoutDuration()`.
    `Duration` | `getRemoveAbandonedTimeoutDuration()` See `BasicDataSource.getRemoveAbandonedTimeoutDuration()`.
    `Duration` | `getSoftMinEvictableIdleDuration()` See `BasicDataSource.getSoftMinEvictableIdleDuration()`.
    `long` | `getSoftMinEvictableIdleTimeMillis()` Deprecated. Use `getSoftMinEvictableIdleDuration()`.
    `boolean` | `getTestOnBorrow()` See `BasicDataSource.getTestOnBorrow()`.
    `boolean` | `getTestOnCreate()` See `BasicDataSource.getTestOnCreate()`.
    `boolean` | `getTestWhileIdle()` See `BasicDataSource.getTestWhileIdle()`.
    `long` | `getTimeBetweenEvictionRunsMillis()` Deprecated. Use `getDurationBetweenEvictionRuns()`.
    `String` | `getUrl()` See `BasicDataSource.getUrl()`.
    `String` | `getUsername()` See `BasicDataSource.getUsername()`.
    `String` | `getValidationQuery()` See `BasicDataSource.getValidationQuery()`.
    `int` | `getValidationQueryTimeout()` Deprecated. Use `getValidationQueryTimeoutDuration()`.
    `Duration` | `getValidationQueryTimeoutDuration()` See `BasicDataSource.getValidationQueryTimeoutDuration()`.
    `boolean` | `isAccessToUnderlyingConnectionAllowed()` See `BasicDataSource.isAccessToUnderlyingConnectionAllowed()`.
    `default boolean` | `isClearStatementPoolOnReturn()` See `BasicDataSource.isClearStatementPoolOnReturn()`.
    `boolean` | `isClosed()` See `BasicDataSource.isClosed()`.
    `boolean` | `isPoolPreparedStatements()` See `BasicDataSource.isPoolPreparedStatements()`.
    `default void` | `restart()` See `BasicDataSource.restart()`
    `default void` | `start()` See `BasicDataSource.start()`

- - ### Method Detail

    - #### getAbandonedUsageTracking

          boolean getAbandonedUsageTracking()

      See `BasicDataSource.getAbandonedUsageTracking()`.
      Returns:
        `BasicDataSource.getAbandonedUsageTracking()`

    - #### getCacheState

          boolean getCacheState()

      See `BasicDataSource.getCacheState()`.
      Returns:
        `BasicDataSource.getCacheState()`.

    - #### getConnectionInitSqlsAsArray

          String[] getConnectionInitSqlsAsArray()

      See `BasicDataSource.getConnectionInitSqlsAsArray()`.
      Returns:
        `BasicDataSource.getConnectionInitSqlsAsArray()`.

    - #### getDefaultAutoCommit

          Boolean getDefaultAutoCommit()

      See `BasicDataSource.getDefaultAutoCommit()`.
      Returns:
        `BasicDataSource.getDefaultAutoCommit()`.

    - #### getDefaultCatalog

          String getDefaultCatalog()

      See `BasicDataSource.getDefaultCatalog()`.
      Returns:
        `BasicDataSource.getDefaultCatalog()`.

    - #### getDefaultReadOnly

          Boolean getDefaultReadOnly()

      See `BasicDataSource.getDefaultReadOnly()`.
      Returns:
        `BasicDataSource.getDefaultReadOnly()`.

    - #### getDefaultSchema

          default String getDefaultSchema()

      See `BasicDataSource.getDefaultSchema()`.
      Returns:
        `BasicDataSource.getDefaultSchema()`.
      Since:
        2.5.0

    - #### getDefaultTransactionIsolation

          int getDefaultTransactionIsolation()

      See `BasicDataSource.getDefaultTransactionIsolation()`.
      Returns:
        `BasicDataSource.getDefaultTransactionIsolation()`.

    - #### getDisconnectionSqlCodesAsArray

          String[] getDisconnectionSqlCodesAsArray()

      See `BasicDataSource.getDisconnectionSqlCodesAsArray()`.
      Returns:
        `BasicDataSource.getDisconnectionSqlCodesAsArray()`.
      Since:
        2.1

    - #### getDriverClassName

          String getDriverClassName()

      See `BasicDataSource.getDriverClassName()`.
      Returns:
        `BasicDataSource.getDriverClassName()`.

    - #### getFastFailValidation

          boolean getFastFailValidation()

      See `BasicDataSource.getFastFailValidation()`.
      Returns:
        `BasicDataSource.getFastFailValidation()`.
      Since:
        2.1

    - #### getInitialSize

          int getInitialSize()

      See `BasicDataSource.getInitialSize()`.
      Returns:
        `BasicDataSource.getInitialSize()`.

    - #### getLifo

          boolean getLifo()

      See `BasicDataSource.getLifo()`.
      Returns:
        `BasicDataSource.getLifo()`.

    - #### getLogAbandoned

          boolean getLogAbandoned()

      See `BasicDataSource.getLogAbandoned()`.
      Returns:
        `BasicDataSource.getLogAbandoned()`.

    - #### getLogExpiredConnections

          boolean getLogExpiredConnections()

      See `BasicDataSource.getLogExpiredConnections()`.
      Returns:
        `BasicDataSource.getLogExpiredConnections()`.
      Since:
        2.1

    - #### getMaxConnDuration

          Duration getMaxConnDuration()

      See `BasicDataSource.getMaxConnDuration()`.
      Returns:
        `BasicDataSource.getMaxConnDuration()`.
      Since:
        2.10.0

    - #### getMaxConnLifetimeMillis

          @Deprecated
          long getMaxConnLifetimeMillis()

      Deprecated. Use `getMaxConnDuration()`.
      See `BasicDataSource.getMaxConnLifetimeMillis()`.
      Returns:
        `BasicDataSource.getMaxConnLifetimeMillis()`.

    - #### getMaxIdle

          int getMaxIdle()

      See `BasicDataSource.getMaxIdle()`.
      Returns:
        `BasicDataSource.getMaxIdle()`.

    - #### getMaxOpenPreparedStatements

          int getMaxOpenPreparedStatements()

      See `BasicDataSource.getMaxOpenPreparedStatements()`.
      Returns:
        `BasicDataSource.getMaxOpenPreparedStatements()`.

    - #### getMaxTotal

          int getMaxTotal()

      See `BasicDataSource.getMaxTotal()`.
      Returns:
        `BasicDataSource.getMaxTotal()`.

    - #### getMaxWaitDuration

          Duration getMaxWaitDuration()

      See `BasicDataSource.getMaxWaitDuration()`.
      Returns:
        `BasicDataSource.getMaxWaitDuration()`.
      Since:
        2.10.0

    - #### getMaxWaitMillis

          @Deprecated
          long getMaxWaitMillis()

      Deprecated. Use `getMaxWaitDuration()`.
      See `BasicDataSource.getMaxWaitMillis()`.
      Returns:
        `BasicDataSource.getMaxWaitMillis()`.

    - #### getMinEvictableIdleDuration

          Duration getMinEvictableIdleDuration()

      See `BasicDataSource.getMinEvictableIdleDuration()`.
      Returns:
        `BasicDataSource.getMinEvictableIdleDuration()`.
      Since:
        2.10.0

    - #### getMinEvictableIdleTimeMillis

          @Deprecated
          long getMinEvictableIdleTimeMillis()

      Deprecated. Use `getMinEvictableIdleDuration()`.
      See `BasicDataSource.getMinEvictableIdleTimeMillis()`.
      Returns:
        `BasicDataSource.getMinEvictableIdleTimeMillis()`.

    - #### getMinIdle

          int getMinIdle()

      See `BasicDataSource.getMinIdle()`.
      Returns:
        `BasicDataSource.getMinIdle()`.

    - #### getNumActive

          int getNumActive()

      See `BasicDataSource.getNumActive()`.
      Returns:
        `BasicDataSource.getNumActive()`.

    - #### getNumIdle

          int getNumIdle()

      See `BasicDataSource.getNumIdle()`.
      Returns:
        `BasicDataSource.getNumIdle()`.

    - #### getNumTestsPerEvictionRun

          int getNumTestsPerEvictionRun()

      See `BasicDataSource.getNumTestsPerEvictionRun()`.
      Returns:
        `BasicDataSource.getNumTestsPerEvictionRun()`.

    - #### getRemoveAbandonedOnBorrow

          boolean getRemoveAbandonedOnBorrow()

      See `BasicDataSource.getRemoveAbandonedOnBorrow()`.
      Returns:
        `BasicDataSource.getRemoveAbandonedOnBorrow()`.

    - #### getRemoveAbandonedOnMaintenance

          boolean getRemoveAbandonedOnMaintenance()

      See `BasicDataSource.getRemoveAbandonedOnMaintenance()`.
      Returns:
        `BasicDataSource.getRemoveAbandonedOnMaintenance()`.

    - #### getRemoveAbandonedTimeoutDuration

          Duration getRemoveAbandonedTimeoutDuration()

      See `BasicDataSource.getRemoveAbandonedTimeoutDuration()`.
      Returns:
        `BasicDataSource.getRemoveAbandonedTimeoutDuration()`.
      Since:
        2.10.0

    - #### getRemoveAbandonedTimeout

          @Deprecated
          int getRemoveAbandonedTimeout()

      Deprecated. Use `getRemoveAbandonedTimeoutDuration()`.
      See `BasicDataSource.getRemoveAbandonedTimeout()`.
      Returns:
        `BasicDataSource.getRemoveAbandonedTimeout()`.

    - #### getSoftMinEvictableIdleDuration

          Duration getSoftMinEvictableIdleDuration()

      See `BasicDataSource.getSoftMinEvictableIdleDuration()`.
      Returns:
        `BasicDataSource.getSoftMinEvictableIdleDuration()`.
      Since:
        2.10.0

    - #### getSoftMinEvictableIdleTimeMillis

          @Deprecated
          long getSoftMinEvictableIdleTimeMillis()

      Deprecated. Use `getSoftMinEvictableIdleDuration()`.
      See `BasicDataSource.getSoftMinEvictableIdleTimeMillis()`.
      Returns:
        `BasicDataSource.getSoftMinEvictableIdleTimeMillis()`.

    - #### getTestOnBorrow

          boolean getTestOnBorrow()

      See `BasicDataSource.getTestOnBorrow()`.
      Returns:
        `BasicDataSource.getTestOnBorrow()`.

    - #### getTestOnCreate

          boolean getTestOnCreate()

      See `BasicDataSource.getTestOnCreate()`.
      Returns:
        `BasicDataSource.getTestOnCreate()`.

    - #### getTestWhileIdle

          boolean getTestWhileIdle()

      See `BasicDataSource.getTestWhileIdle()`.
      Returns:
        `BasicDataSource.getTestWhileIdle()`.

    - #### getDurationBetweenEvictionRuns

          Duration getDurationBetweenEvictionRuns()

      See `BasicDataSource.getDurationBetweenEvictionRuns()`.
      Returns:
        `BasicDataSource.getDurationBetweenEvictionRuns()`.
      Since:
        2.10.0

    - #### getTimeBetweenEvictionRunsMillis

          @Deprecated
          long getTimeBetweenEvictionRunsMillis()

      Deprecated. Use `getDurationBetweenEvictionRuns()`.
      See `BasicDataSource.getTimeBetweenEvictionRunsMillis()`.
      Returns:
        `BasicDataSource.getTimeBetweenEvictionRunsMillis()`.

    - #### getUrl

          String getUrl()

      See `BasicDataSource.getUrl()`.
      Returns:
        `BasicDataSource.getUrl()`.

    - #### getUsername

          String getUsername()

      See `BasicDataSource.getUsername()`.
      Returns:
        `BasicDataSource.getUsername()`.

    - #### getValidationQuery

          String getValidationQuery()

      See `BasicDataSource.getValidationQuery()`.
      Returns:
        `BasicDataSource.getValidationQuery()`.

    - #### getValidationQueryTimeoutDuration

          Duration getValidationQueryTimeoutDuration()

      See `BasicDataSource.getValidationQueryTimeoutDuration()`.
      Returns:
        `BasicDataSource.getValidationQueryTimeoutDuration()`.
      Since:
        2.10.0

    - #### getValidationQueryTimeout

          @Deprecated
          int getValidationQueryTimeout()

      Deprecated. Use `getValidationQueryTimeoutDuration()`.
      See `BasicDataSource.getValidationQueryTimeout()`.
      Returns:
        `BasicDataSource.getValidationQueryTimeout()`.

    - #### isAccessToUnderlyingConnectionAllowed

          boolean isAccessToUnderlyingConnectionAllowed()

      See `BasicDataSource.isAccessToUnderlyingConnectionAllowed()`.
      Returns:
        `BasicDataSource.isAccessToUnderlyingConnectionAllowed()`.

    - #### isClearStatementPoolOnReturn

          default boolean isClearStatementPoolOnReturn()

      See `BasicDataSource.isClearStatementPoolOnReturn()`.
      Returns:
        `BasicDataSource.isClearStatementPoolOnReturn()`.
      Since:
        2.8.0

    - #### isClosed

          boolean isClosed()

      See `BasicDataSource.isClosed()`.
      Returns:
        `BasicDataSource.isClosed()`.

    - #### isPoolPreparedStatements

          boolean isPoolPreparedStatements()

      See `BasicDataSource.isPoolPreparedStatements()`.
      Returns:
        `BasicDataSource.isPoolPreparedStatements()`.

    - #### restart

          default void restart()
                        throws SQLException

      See `BasicDataSource.restart()`
      Throws:
        `SQLException` - if an error occurs initializing the data source.
      Since:
        2.8.0

    - #### start

          default void start()
                      throws SQLException

      See `BasicDataSource.start()`
      Throws:
        `SQLException` - if an error occurs initializing the data source.
      Since:
        2.8.0

Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.