Class CountingDataSource

  • All Implemented Interfaces:
    java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

    public class CountingDataSource
    extends DelegatingDataSource
    A delegating DataSource that maintains a count of all update-style queries that go through it.
    • Constructor Detail

      • CountingDataSource

        public CountingDataSource​(javax.sql.DataSource delegateDatasource)
    • Method Detail

      • wrap

        protected java.sql.Connection wrap​(java.sql.Connection con)
        Overrides:
        wrap in class DelegatingDataSource
      • getDelegateDatasource

        public javax.sql.DataSource getDelegateDatasource()
        Provides access to the underlying datasource for operations that shouldn't increment the count
      • getUpdateCount

        public long getUpdateCount()