@Test public void start() { prepareStart(); verify(executorService).execute(solverExecutor); verify(executorService).execute(solutionSynchronizer); verify(executorService).execute(solutionProcessor); verify(solutionSynchronizer).initSolverExecutor(); }
public void start() { solverExecutor = createSolverExecutor(solverDef, registry, this::onBestSolutionChange); solutionSynchronizer = createSolutionSynchronizer(solverExecutor, delegate, userSystemService, config.getSyncInterval(), config.getUsersSyncInterval(), context, this::onSolutionSynchronized); solutionProcessor = createSolutionProcessor(delegate, this::onSolutionProcessed, config.getTargetUserId(), config.getPublishWindowSize()); executorService.execute(solverExecutor); executorService.execute(solutionSynchronizer); executorService.execute(solutionProcessor); solutionSynchronizer.initSolverExecutor(); }
SolverHandler { public void start() { solverExecutor = createSolverExecutor(solverDef, registry, this::onBestSolutionChange); solutionSynchronizer = createSolutionSynchronizer(solverExecutor, delegate, userSystemService, config.getSyncInterval(), config.getUsersSyncInterval(), context, this::onSolutionSynchronized); solutionProcessor = createSolutionProcessor(delegate, this::onSolutionProcessed, config.getTargetUserId(), config.getPublishWindowSize()); executorService.execute(solverExecutor); executorService.execute(solutionSynchronizer); executorService.execute(solutionProcessor); solutionSynchronizer.initSolverExecutor(); } }
SolverHandler { public void start() { solverExecutor = createSolverExecutor(solverDef, registry, this::onBestSolutionChange); solutionSynchronizer = createSolutionSynchronizer(solverExecutor, delegate, userSystemService, config.getSyncInterval(), config.getUsersSyncInterval(), context, this::onSolutionSynchronized); solutionProcessor = createSolutionProcessor(delegate, this::onSolutionProcessed, config.getTargetUserId(), config.getPublishWindowSize()); executorService.execute(solverExecutor); executorService.execute(solutionSynchronizer); executorService.execute(solutionProcessor); solutionSynchronizer.initSolverExecutor(); } SolverHandler(final SolverDef solverDef,
                         final KieServerRegistry registry,
                         final TaskAssigningRuntimeDelegate delegate,
                         final UserSystemService userSystemService,
                         final ScheduledExecutorService executorService,
                         final SolverHandlerConfig config); }
SolverHandler { public void start() { solverExecutor = createSolverExecutor(solverDef, registry, this::onBestSolutionChange); solutionSynchronizer = createSolutionSynchronizer(solverExecutor, delegate, userSystemService, config.getSyncInterval(), config.getUsersSyncInterval(), context, this::onSolutionSynchronized); solutionProcessor = createSolutionProcessor(delegate, this::onSolutionProcessed, config.getTargetUserId(), config.getPublishWindowSize()); executorService.execute(solverExecutor); executorService.execute(solutionSynchronizer); executorService.execute(solutionProcessor); solutionSynchronizer.initSolverExecutor(); } SolverHandler(final SolverDef solverDef,
                         final KieServerRegistry registry,
                         final TaskAssigningRuntimeDelegate delegate,
                         final UserSystemService userSystemService,
                         final ScheduledExecutorService executorService,
                         final SolverHandlerConfig config); void start(); void destroy(); }
SolverHandler { public void start() { solverExecutor = createSolverExecutor(solverDef, registry, this::onBestSolutionChange); solutionSynchronizer = createSolutionSynchronizer(solverExecutor, delegate, userSystemService, config.getSyncInterval(), config.getUsersSyncInterval(), context, this::onSolutionSynchronized); solutionProcessor = createSolutionProcessor(delegate, this::onSolutionProcessed, config.getTargetUserId(), config.getPublishWindowSize()); executorService.execute(solverExecutor); executorService.execute(solutionSynchronizer); executorService.execute(solutionProcessor); solutionSynchronizer.initSolverExecutor(); } SolverHandler(final SolverDef solverDef,
                         final KieServerRegistry registry,
                         final TaskAssigningRuntimeDelegate delegate,
                         final UserSystemService userSystemService,
                         final ScheduledExecutorService executorService,
                         final SolverHandlerConfig config); void start(); void destroy();  }