Class BaseCaptureQueriesListener

java.lang.Object
ca.uhn.fhir.jpa.util.BaseCaptureQueriesListener
All Implemented Interfaces:
net.ttddyy.dsproxy.support.ProxyDataSourceBuilder.SingleMethodExecution, net.ttddyy.dsproxy.support.ProxyDataSourceBuilder.SingleQueryExecution
Direct Known Subclasses:
CircularQueueCaptureQueriesListener, CurrentThreadCaptureQueriesListener

public abstract class BaseCaptureQueriesListener extends Object implements net.ttddyy.dsproxy.support.ProxyDataSourceBuilder.SingleQueryExecution, net.ttddyy.dsproxy.support.ProxyDataSourceBuilder.SingleMethodExecution
  • Constructor Details

  • Method Details

    • isCaptureQueryStackTrace

      public boolean isCaptureQueryStackTrace()
      This has an impact on performance! Use with caution.
    • setCaptureQueryStackTrace

      public void setCaptureQueryStackTrace(boolean theCaptureQueryStackTrace)
      This has an impact on performance! Use with caution.
    • execute

      public void execute(net.ttddyy.dsproxy.ExecutionInfo theExecutionInfo, List<net.ttddyy.dsproxy.QueryInfo> theQueryInfoList)
      Specified by:
      execute in interface net.ttddyy.dsproxy.support.ProxyDataSourceBuilder.SingleQueryExecution
    • provideQueryList

      protected abstract Queue<SqlQuery> provideQueryList()
    • provideCommitCounter

      @Nullable protected abstract AtomicInteger provideCommitCounter()
    • provideGetConnectionCounter

      @Nullable protected abstract AtomicInteger provideGetConnectionCounter()
    • provideRollbackCounter

      @Nullable protected abstract AtomicInteger provideRollbackCounter()
    • execute

      public void execute(net.ttddyy.dsproxy.listener.MethodExecutionContext executionContext)
      Specified by:
      execute in interface net.ttddyy.dsproxy.support.ProxyDataSourceBuilder.SingleMethodExecution
    • countGetConnections

      public int countGetConnections()
      Returns:
      Returns the number of times the connection pool was asked for a new connection
    • countCommits

      public int countCommits()
      Returns:
      Returns the number of DB commits which have happened against connections from the pool
    • countRollbacks

      public int countRollbacks()
      Returns:
      Returns the number of DB rollbacks which have happened against connections from the pool