@Test(timeout = TEST_TIMEOUT) public void addProblemFactChanges() throws Exception { CompletableFuture future = startRunnableBase(); runnableBase.start(solution); startFinished.await(); List<ProblemFactChange<TaskAssigningSolution>> changes = Collections.emptyList(); runnableBase.addProblemFactChanges(changes); verify(solver).addProblemFactChanges(changes); runnableBase.destroy(); future.get(); assertTrue(runnableBase.isDestroyed()); }
public void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes) { if (isStarted()) { solver.addProblemFactChanges(changes); } else { throw new SolverExecutorException("SolverExecutor has not been started. Be sure it's started and not stopped or destroyed prior to executing this method"); } }
SolverExecutor extends RunnableBase { public void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes) { if (isStarted()) { solver.addProblemFactChanges(changes); } else { throw new SolverExecutorException("SolverExecutor has not been started. Be sure it's started and not stopped or destroyed prior to executing this method"); } } }
SolverExecutor extends RunnableBase { public void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes) { if (isStarted()) { solver.addProblemFactChanges(changes); } else { throw new SolverExecutorException("SolverExecutor has not been started. Be sure it's started and not stopped or destroyed prior to executing this method"); } } SolverExecutor(final SolverDef solverDef,
                          final KieServerRegistry registry,
                          final SolverEventListener<TaskAssigningSolution> eventListener); }
SolverExecutor extends RunnableBase { public void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes) { if (isStarted()) { solver.addProblemFactChanges(changes); } else { throw new SolverExecutorException("SolverExecutor has not been started. Be sure it's started and not stopped or destroyed prior to executing this method"); } } SolverExecutor(final SolverDef solverDef,
                          final KieServerRegistry registry,
                          final SolverEventListener<TaskAssigningSolution> eventListener); void start(final TaskAssigningSolution solution); boolean isStarted(); boolean isStopped(); void stop(); @Override void destroy(); void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes); @Override void run(); }
SolverExecutor extends RunnableBase { public void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes) { if (isStarted()) { solver.addProblemFactChanges(changes); } else { throw new SolverExecutorException("SolverExecutor has not been started. Be sure it's started and not stopped or destroyed prior to executing this method"); } } SolverExecutor(final SolverDef solverDef,
                          final KieServerRegistry registry,
                          final SolverEventListener<TaskAssigningSolution> eventListener); void start(final TaskAssigningSolution solution); boolean isStarted(); boolean isStopped(); void stop(); @Override void destroy(); void addProblemFactChanges(final List<ProblemFactChange<TaskAssigningSolution>> changes); @Override void run();  }