Interface DataSourcePool

    • Method Detail

      • size

        int size()
        Return the current size of the pool. This includes both busy and idle connections.
      • isAutoCommit

        boolean isAutoCommit()
        Return true if the pool defaults to using autocommit.
      • isOnline

        boolean isOnline()
        Return true if the DataSource is online.

        Effectively the same as (synonym for) isDataSourceUp().

      • offline

        void offline()
        Take the DataSource offline closing all connections and stopping heart beat checking.
      • shutdown

        void shutdown()
        Shutdown the pool.

        This is functionally the same as offline() but generally we expect to only shutdown the pool once where as we can expect to making many calls to offline() and online().

      • getStatus

        PoolStatus getStatus​(boolean reset)
        Return the current status of the connection pool.

        This is cheaper than getStatistics() in that it just the counts of free, busy, wait etc and does not included times (total connection time etc).

        If you pass reset = true then the counters are reset.

      • isDataSourceUp

        boolean isDataSourceUp()
        Returns false when the dataSource is down.

        Effectively the same as (synonym for) isOnline().

      • setMaxSize

        void setMaxSize​(int max)
        Set a new maximum size. The pool should respect this new maximum immediately and not require a restart. You may want to increase the maxConnections if the pool gets large and hits the warning level.
      • setWarningSize

        void setWarningSize​(int warningSize)
        Set a new maximum size. The pool should respect this new maximum immediately and not require a restart. You may want to increase the maxConnections if the pool gets large and hits the warning and or alert levels.
      • getWarningSize

        int getWarningSize()
        Return the warning size. When the pool hits this size it can send a notify message to an administrator.