Search in sources :

Example 1 with PipeliteMetrics

use of pipelite.metrics.PipeliteMetrics 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);
}
Also used : ProcessQueue(pipelite.runner.process.ProcessQueue) ProcessRunnerFactory(pipelite.runner.process.ProcessRunnerFactory) PipeliteMetrics(pipelite.metrics.PipeliteMetrics) ProcessQueueFactory(pipelite.runner.process.ProcessQueueFactory) PipeliteException(pipelite.exception.PipeliteException) RegisteredPipelineService(pipelite.service.RegisteredPipelineService) ProcessEntityCreator(pipelite.runner.process.creator.ProcessEntityCreator) PipeliteConfiguration(pipelite.configuration.PipeliteConfiguration) Pipeline(pipelite.Pipeline) ProcessRunner(pipelite.runner.process.ProcessRunner) PipeliteServices(pipelite.service.PipeliteServices) ProcessQueueFactory(pipelite.runner.process.ProcessQueueFactory) ProcessRunnerFactory(pipelite.runner.process.ProcessRunnerFactory) RegisteredPipelineService(pipelite.service.RegisteredPipelineService) ProcessQueue(pipelite.runner.process.ProcessQueue) PipeliteException(pipelite.exception.PipeliteException) ProcessEntityCreator(pipelite.runner.process.creator.ProcessEntityCreator) ProcessRunner(pipelite.runner.process.ProcessRunner) Pipeline(pipelite.Pipeline)

Aggregations

Pipeline (pipelite.Pipeline)1 PipeliteConfiguration (pipelite.configuration.PipeliteConfiguration)1 PipeliteException (pipelite.exception.PipeliteException)1 PipeliteMetrics (pipelite.metrics.PipeliteMetrics)1 ProcessQueue (pipelite.runner.process.ProcessQueue)1 ProcessQueueFactory (pipelite.runner.process.ProcessQueueFactory)1 ProcessRunner (pipelite.runner.process.ProcessRunner)1 ProcessRunnerFactory (pipelite.runner.process.ProcessRunnerFactory)1 ProcessEntityCreator (pipelite.runner.process.creator.ProcessEntityCreator)1 PipeliteServices (pipelite.service.PipeliteServices)1 RegisteredPipelineService (pipelite.service.RegisteredPipelineService)1