@Test public void optimizationStopped() { IndividualCompleterModule module = new IndividualCompleterModule(); module.setThreads(4); module.setType(Type.PARALLEL); Injector injector = Guice.createInjector(new MockProblemModule(), module); ParallelIndividualCompleter completer = injector.getInstance(ParallelIndividualCompleter.class); completer.optimizationStopped(null); Assert.assertTrue(completer.executor.isShutdown()); Assert.assertTrue(completer.executor.isShutdown()); }
@Override public void optimizationStopped(Optimizer optimizer) { shutdownExecutorService(); }
ParallelIndividualCompleter extends SequentialIndividualCompleter implements OptimizerStateListener { @Override public void optimizationStopped(Optimizer optimizer) { shutdownExecutorService(); } }
ParallelIndividualCompleter extends SequentialIndividualCompleter implements OptimizerStateListener { @Override public void optimizationStopped(Optimizer optimizer) { shutdownExecutorService(); } @Inject  ParallelIndividualCompleter(Control control, Decoder<Genotype, Object> decoder, Evaluator<Object> evaluator,
			@Constant(value = "maxThreads", namespace = ParallelIndividualCompleter.class) int maxThreads); }
ParallelIndividualCompleter extends SequentialIndividualCompleter implements OptimizerStateListener { @Override public void optimizationStopped(Optimizer optimizer) { shutdownExecutorService(); } @Inject  ParallelIndividualCompleter(Control control, Decoder<Genotype, Object> decoder, Evaluator<Object> evaluator,
			@Constant(value = "maxThreads", namespace = ParallelIndividualCompleter.class) int maxThreads); @Override void complete(Iterable<? extends Individual> iterable); @Override void optimizationStarted(Optimizer optimizer); @Override void optimizationStopped(Optimizer optimizer); }
ParallelIndividualCompleter extends SequentialIndividualCompleter implements OptimizerStateListener { @Override public void optimizationStopped(Optimizer optimizer) { shutdownExecutorService(); } @Inject  ParallelIndividualCompleter(Control control, Decoder<Genotype, Object> decoder, Evaluator<Object> evaluator,
			@Constant(value = "maxThreads", namespace = ParallelIndividualCompleter.class) int maxThreads); @Override void complete(Iterable<? extends Individual> iterable); @Override void optimizationStarted(Optimizer optimizer); @Override void optimizationStopped(Optimizer optimizer);  }