@Test public void destroy() throws Exception { prepareStart(); handler.destroy(); verifyDestroyCommonActions(); }
public void destroy() { solverExecutor.destroy(); solutionSynchronizer.destroy(); solutionProcessor.destroy(); executorService.shutdown(); try { executorService.awaitTermination(EXECUTOR_TERMINATION_TIMEOUT, TimeUnit.SECONDS); LOGGER.debug("ExecutorService was successfully shutted down."); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.debug("An exception was thrown during executionService graceful termination.", e); executorService.shutdownNow(); } }
SolverHandler { public void destroy() { solverExecutor.destroy(); solutionSynchronizer.destroy(); solutionProcessor.destroy(); executorService.shutdown(); try { executorService.awaitTermination(EXECUTOR_TERMINATION_TIMEOUT, TimeUnit.SECONDS); LOGGER.debug("ExecutorService was successfully shutted down."); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.debug("An exception was thrown during executionService graceful termination.", e); executorService.shutdownNow(); } } }
SolverHandler { public void destroy() { solverExecutor.destroy(); solutionSynchronizer.destroy(); solutionProcessor.destroy(); executorService.shutdown(); try { executorService.awaitTermination(EXECUTOR_TERMINATION_TIMEOUT, TimeUnit.SECONDS); LOGGER.debug("ExecutorService was successfully shutted down."); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.debug("An exception was thrown during executionService graceful termination.", e); executorService.shutdownNow(); } } SolverHandler(final SolverDef solverDef,
                         final KieServerRegistry registry,
                         final TaskAssigningRuntimeDelegate delegate,
                         final UserSystemService userSystemService,
                         final ScheduledExecutorService executorService,
                         final SolverHandlerConfig config); }
SolverHandler { public void destroy() { solverExecutor.destroy(); solutionSynchronizer.destroy(); solutionProcessor.destroy(); executorService.shutdown(); try { executorService.awaitTermination(EXECUTOR_TERMINATION_TIMEOUT, TimeUnit.SECONDS); LOGGER.debug("ExecutorService was successfully shutted down."); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.debug("An exception was thrown during executionService graceful termination.", e); executorService.shutdownNow(); } } 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 destroy() { solverExecutor.destroy(); solutionSynchronizer.destroy(); solutionProcessor.destroy(); executorService.shutdown(); try { executorService.awaitTermination(EXECUTOR_TERMINATION_TIMEOUT, TimeUnit.SECONDS); LOGGER.debug("ExecutorService was successfully shutted down."); } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOGGER.debug("An exception was thrown during executionService graceful termination.", e); executorService.shutdownNow(); } } SolverHandler(final SolverDef solverDef,
                         final KieServerRegistry registry,
                         final TaskAssigningRuntimeDelegate delegate,
                         final UserSystemService userSystemService,
                         final ScheduledExecutorService executorService,
                         final SolverHandlerConfig config); void start(); void destroy();  }