Package org.sqlproc.engine
Interface SqlMonitor
- All Known Subinterfaces:
SqlExtendedMonitor
- All Known Implementing Classes:
SqlEmptyMonitor
public interface SqlMonitor
The vehicle interface definition, which can be used to monitor the duration of all SQL queries execution.
The implementation can be based for example on the Javasimon library. The standard implementation is an empty one, which just delegates the execution to the runner, for example
public <E> List<E> runList(Runner runner, Class<E> resultClass) { return (List<E>) runner.run(); }
For more info please see the Tutorials.
- Author:
- Vladimir Hudec
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
This interface is implemented inSqlQueryEngine
andSqlCrudEngine
main public methods. -
Method Summary
Modifier and TypeMethodDescription<E> E
run
(SqlMonitor.Runner runner, Class<E> resultClass) The SQLMonitor visitor method called from inside the main execution methods inSqlCrudEngine
andSqlCrudEngine
.<E> List
<E> runList
(SqlMonitor.Runner runner, Class<E> resultClass) The SQLMonitor visitor method called from inside the main execution methods inSqlQueryEngine
.
-
Method Details
-
runList
The SQLMonitor visitor method called from inside the main execution methods inSqlQueryEngine
.- Parameters:
runner
- the anonymous instance ofSqlMonitor.Runner
, which encapsulates the query executionresultClass
- the class used for the return values of the query execution output- Returns:
- the list of the resultClass instances
-
run
The SQLMonitor visitor method called from inside the main execution methods inSqlCrudEngine
andSqlCrudEngine
.- Parameters:
runner
- the anonymous instance ofSqlMonitor.Runner
, which encapsulates the query executionresultClass
- the class used for the return value of the query execution output- Returns:
- the instance of the resultClass
-