mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
add helper method for ActivityDefObserver application
This commit is contained in:
parent
5b8ed36f49
commit
5dbfa385a8
@ -25,4 +25,12 @@ import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
*/
|
||||
public interface ActivityDefObserver {
|
||||
void onActivityDefUpdate(ActivityDef activityDef);
|
||||
|
||||
static void apply(ActivityDef def, Object... candidates) {
|
||||
for (Object candidate : candidates) {
|
||||
if (candidate instanceof ActivityDefObserver observer) {
|
||||
observer.onActivityDefUpdate(def);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user