use of pipelite.configuration.PipeliteConfiguration in project pipelite by enasequence.
the class PipelineRunnerFactory method create.
public static PipelineRunner create(PipeliteConfiguration pipeliteConfiguration, PipeliteServices pipeliteServices, PipeliteMetrics pipeliteMetrics, String pipelineName) {
// Get registered pipeline.
RegisteredPipelineService registeredPipelineService = pipeliteServices.registeredPipeline();
Pipeline pipeline = registeredPipelineService.getRegisteredPipeline(pipelineName, Pipeline.class);
if (pipeline == null) {
throw new PipeliteException("Missing pipeline: " + pipelineName);
}
// Get process creator.
ProcessEntityCreator processEntityCreator = new ProcessEntityCreator(pipeline, pipeliteServices.process());
ProcessQueueFactory processQueueFactory = (pipeline1) -> new ProcessQueue(pipeliteConfiguration, pipeliteServices, pipeline1);
boolean lockProcess = true;
ProcessRunnerFactory processRunnerFactory = (pipelineName1, process1) -> new ProcessRunner(pipeliteConfiguration, pipeliteServices, pipeliteMetrics, pipelineName1, process1, lockProcess);
return create(pipeliteConfiguration, pipeliteServices, pipeliteMetrics, pipeline, processEntityCreator, processQueueFactory, processRunnerFactory);
}
Aggregations