public class ScenariosExecutor extends Object
| Constructor and Description |
|---|
ScenariosExecutor(String name) |
ScenariosExecutor(String name,
int threads) |
| Modifier and Type | Method and Description |
|---|---|
ScenariosResults |
awaitAllResults()
Shuts down all running scenarios and awaits all results.
|
ScenariosResults |
awaitAllResults(long timeout,
long updateInterval)
Shuts down all running scenarios and awaits all results.
|
void |
cancelScenario(String scenarioName) |
void |
execute(Scenario scenario) |
void |
execute(Scenario scenario,
ScenarioLogger scenarioLogger) |
Map<Scenario,Optional<ScenarioResult>> |
getAsyncResultStatus()
Returns a map of all pending scenario names and optional results.
|
String |
getName() |
Optional<ScenarioResult> |
getPendingResult(String scenarioName)
Get the result of a pending or completed scenario.
|
Optional<Scenario> |
getPendingScenario(String scenarioName) |
List<String> |
getPendingScenarios() |
void |
notifyException(Thread t,
Throwable e) |
String |
toString() |
public ScenariosExecutor(String name)
public ScenariosExecutor(String name, int threads)
public void execute(Scenario scenario)
public void execute(Scenario scenario, ScenarioLogger scenarioLogger)
public ScenariosResults awaitAllResults()
public ScenariosResults awaitAllResults(long timeout, long updateInterval)
timeout - how long to wait for the results to completeupdateInterval - how frequently to log status while waitingpublic List<String> getPendingScenarios()
public Map<Scenario,Optional<ScenarioResult>> getAsyncResultStatus()
Returns a map of all pending scenario names and optional results. All submitted scenarios are included. Those which are still pending are returned with an empty option.
Results may be exceptional. If ScenarioResult.getException() is present,
then the result did not complete normally.
public Optional<ScenarioResult> getPendingResult(String scenarioName)
If the scenario is still pending, then the optional will be empty.
scenarioName - the scenario name of interestpublic void cancelScenario(String scenarioName)
public String getName()
Copyright © 2017. All rights reserved.