mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
allow injecting ActivityDef into DriverAdapter
This commit is contained in:
parent
ff2e058a93
commit
4f1df146bc
@ -0,0 +1,7 @@
|
|||||||
|
package io.nosqlbench.engine.api.activityimpl.uniform;
|
||||||
|
|
||||||
|
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||||
|
|
||||||
|
public interface ActivityDefAware {
|
||||||
|
void setActivityDef(ActivityDef activiytDef);
|
||||||
|
}
|
@ -315,7 +315,7 @@ public class ScenarioController {
|
|||||||
Optional<DriverAdapter> oda = StandardActivityType.FINDER.getOptionally(activityTypeName);
|
Optional<DriverAdapter> oda = StandardActivityType.FINDER.getOptionally(activityTypeName);
|
||||||
if (oda.isPresent()) {
|
if (oda.isPresent()) {
|
||||||
DriverAdapter driverAdapter = oda.get();
|
DriverAdapter driverAdapter = oda.get();
|
||||||
activityType = new StandardActivityType<>(driverAdapter);
|
activityType = new StandardActivityType<>(driverAdapter,activityDef);
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Found neither ActivityType named '" + activityTypeName + "' nor DriverAdapter named '" + activityTypeName + "'.");
|
throw new RuntimeException("Found neither ActivityType named '" + activityTypeName + "' nor DriverAdapter named '" + activityTypeName + "'.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user