use of com.nextdoor.bender.operation.fork.ForkOperationConfig.Fork in project bender by Nextdoor.
the class ForkOperationFactory method setConf.
@Override
public void setConf(AbstractConfig config) {
this.config = (ForkOperationConfig) config;
List<List<OperationProcessor>> processors = new ArrayList<List<OperationProcessor>>();
OperationFactoryFactory off = new OperationFactoryFactory();
for (Fork fork : this.config.getForks()) {
List<OperationProcessor> processorsInFork = new ArrayList<OperationProcessor>();
for (OperationConfig opConfig : fork.getOperations()) {
try {
processorsInFork.add(new OperationProcessor(off.getFactory(opConfig)));
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
processors.add(processorsInFork);
}
this.processors = processors;
}
Aggregations