allow injecting ActivityDef into DriverAdapter

This commit is contained in:
Jonathan Shook 2021-07-08 11:48:57 -05:00
parent ff2e058a93
commit 4f1df146bc
2 changed files with 8 additions and 1 deletions

View File

@ -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);
}

View File

@ -315,7 +315,7 @@ public class ScenarioController {
Optional<DriverAdapter> oda = StandardActivityType.FINDER.getOptionally(activityTypeName);
if (oda.isPresent()) {
DriverAdapter driverAdapter = oda.get();
activityType = new StandardActivityType<>(driverAdapter);
activityType = new StandardActivityType<>(driverAdapter,activityDef);
} else {
throw new RuntimeException("Found neither ActivityType named '" + activityTypeName + "' nor DriverAdapter named '" + activityTypeName + "'.");
}