com.atlassian.jira.ofbiz
Class PerformanceSQLInterceptor

java.lang.Object
  extended by com.atlassian.jira.ofbiz.PerformanceSQLInterceptor
All Implemented Interfaces:
org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor, org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

public class PerformanceSQLInterceptor
extends Object
implements org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor

A SQL interceptor that stores all SQL call invocations as well as timing information in a thread local cache.

Since:
v4.4

Nested Class Summary
static class PerformanceSQLInterceptor.SQLPerfCache
           
 
Field Summary
static String SQL_PERF_CACHE
           
 
Constructor Summary
PerformanceSQLInterceptor()
           
 
Method Summary
 void afterSuccessfulExecution(String sql, List<String> params, Statement statement, ResultSet resultSet, int i)
           
 void beforeExecution(String sql, List<String> params, Statement statement)
           
 void onConnectionReplaced(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
           
 void onConnectionTaken(Connection connection, org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
           
 void onException(String sql, List<String> params, Statement statement, SQLException e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SQL_PERF_CACHE

public static final String SQL_PERF_CACHE
See Also:
Constant Field Values
Constructor Detail

PerformanceSQLInterceptor

public PerformanceSQLInterceptor()
Method Detail

onConnectionTaken

public void onConnectionTaken(Connection connection,
                              org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
Specified by:
onConnectionTaken in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor

onConnectionReplaced

public void onConnectionReplaced(Connection connection,
                                 org.ofbiz.core.entity.jdbc.interceptors.connection.ConnectionPoolState connectionPoolState)
Specified by:
onConnectionReplaced in interface org.ofbiz.core.entity.jdbc.interceptors.connection.SQLConnectionInterceptor

beforeExecution

public void beforeExecution(String sql,
                            List<String> params,
                            Statement statement)
Specified by:
beforeExecution in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

afterSuccessfulExecution

public void afterSuccessfulExecution(String sql,
                                     List<String> params,
                                     Statement statement,
                                     ResultSet resultSet,
                                     int i)
Specified by:
afterSuccessfulExecution in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor

onException

public void onException(String sql,
                        List<String> params,
                        Statement statement,
                        SQLException e)
Specified by:
onException in interface org.ofbiz.core.entity.jdbc.interceptors.SQLInterceptor


Copyright © 2002-2014 Atlassian. All Rights Reserved.