@Override public void stop(StopContext context) { this.service.stop(context); }
@Override public void stop(final StopContext context) { if (this.asyncStop) { Runnable task = () -> { try { this.service.stop(context); } finally { context.complete(); } }; try { this.executor.get().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { this.service.stop(context); } } }
@Override public void stop(StopContext context) { this.service.stop(context); }
@Override public void stop(final StopContext context) { if (this.asyncStop) { Runnable task = () -> { try { this.service.stop(context); } finally { context.complete(); } }; try { this.executor.get().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { this.service.stop(context); } } }