Class AbstractQueryReport.StatementProxy

java.lang.Object
org.apache.tomcat.jdbc.pool.interceptor.AbstractQueryReport.StatementProxy
All Implemented Interfaces:
InvocationHandler
Enclosing class:
AbstractQueryReport

protected class AbstractQueryReport.StatementProxy extends Object implements InvocationHandler
Class to measure query execute time
  • Field Details

    • closed

      protected volatile boolean closed
      Indicates whether the proxy has been closed. A statement can be closed from a thread other than the one executing on it - the statement finalizer closes tracked statements from whichever thread closes the connection - so the flag is written by one thread and read by others, and must be volatile to reach them at all.
    • delegate

      protected volatile Object delegate
      The statement being proxied, or a further interceptor's proxy of it, nulled once a close has been forwarded. It is read by threads other than the one that nulls it, so, like closed, volatile.
    • query

      protected final String query
      The SQL the statement was prepared with, or null when it was created without one.
  • Constructor Details

    • StatementProxy

      public StatementProxy(Object parent, String query)
      Constructs a new StatementProxy.
      Parameters:
      parent - The statement being proxied, or a further interceptor's proxy of it
      query - The SQL the statement was prepared with, or null when it was created without one
  • Method Details