@Override public void start(StartContext context) throws StartException { this.service.start(context); }
@Override public void start(final StartContext context) throws StartException { if (this.asyncStart) { Runnable task = () -> { try { this.service.start(context); context.complete(); } catch (StartException e) { context.failed(e); } catch (Throwable e) { context.failed(new StartException(e)); } }; try { this.executor.get().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { this.service.start(context); } }
@Override public void start(StartContext context) throws StartException { this.service.start(context); }
@Override public void start(final StartContext context) throws StartException { if (this.asyncStart) { Runnable task = () -> { try { this.service.start(context); context.complete(); } catch (StartException e) { context.failed(e); } catch (Throwable e) { context.failed(new StartException(e)); } }; try { this.executor.get().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { this.service.start(context); } }