Package is.codion.tools.loadtest.model
Class QueryLoadTestModel.QueryPerformer
java.lang.Object
is.codion.tools.loadtest.model.QueryLoadTestModel.QueryPerformer
- All Implemented Interfaces:
LoadTest.Scenario.Performer<QueryLoadTestModel.QueryApplication>
- Enclosing class:
- QueryLoadTestModel
public static class QueryLoadTestModel.QueryPerformer
extends Object
implements LoadTest.Scenario.Performer<QueryLoadTestModel.QueryApplication>
-
Constructor Summary
ConstructorDescriptionQueryPerformer
(User user, String query) Instantiates a new non-transactional QueryPerformer.QueryPerformer
(User user, String query, boolean transactional) Instantiates a new QueryPerformer. -
Method Summary
Modifier and TypeMethodDescriptionFor overriding, returns the parameter values to use for the next query execution, these must of course match the parameter slots in the underlying query.void
perform
(QueryLoadTestModel.QueryApplication application) Performs the scenario using the given application
-
Constructor Details
-
QueryPerformer
Instantiates a new non-transactional QueryPerformer.- Parameters:
user
- the userquery
- the query
-
QueryPerformer
Instantiates a new QueryPerformer.- Parameters:
user
- the userquery
- the querytransactional
- if true, commit and rollback is performed on success and error respectively
-
-
Method Details
-
perform
Description copied from interface:LoadTest.Scenario.Performer
Performs the scenario using the given application- Specified by:
perform
in interfaceLoadTest.Scenario.Performer<QueryLoadTestModel.QueryApplication>
- Parameters:
application
- the application- Throws:
Exception
- in case of an exception
-
parameters
For overriding, returns the parameter values to use for the next query execution, these must of course match the parameter slots in the underlying query.- Returns:
- a list of parameters for the next query run or an empty list in case of no parameters
-