Search in sources :

Example 1 with StopWatchListener

use of org.jooq.tools.StopWatchListener in project jOOQ by jOOQ.

the class ExecuteListeners method listeners.

/**
     * Provide delegate listeners from an <code>ExecuteContext</code>
     */
private static ExecuteListener[] listeners(ExecuteContext ctx) {
    List<ExecuteListener> result = new ArrayList<ExecuteListener>();
    for (ExecuteListenerProvider provider : ctx.configuration().executeListenerProviders()) // Could be null after deserialisation
    if (provider != null)
        result.add(provider.provide());
    if (!FALSE.equals(ctx.configuration().settings().isExecuteLogging())) {
        result.add(new LoggerListener());
        result.add(new StopWatchListener());
    }
    return result.toArray(EMPTY_EXECUTE_LISTENER);
}
Also used : ArrayList(java.util.ArrayList) StopWatchListener(org.jooq.tools.StopWatchListener) ExecuteListenerProvider(org.jooq.ExecuteListenerProvider) ExecuteListener(org.jooq.ExecuteListener) LoggerListener(org.jooq.tools.LoggerListener)

Aggregations

ArrayList (java.util.ArrayList)1 ExecuteListener (org.jooq.ExecuteListener)1 ExecuteListenerProvider (org.jooq.ExecuteListenerProvider)1 LoggerListener (org.jooq.tools.LoggerListener)1 StopWatchListener (org.jooq.tools.StopWatchListener)1