@Override public synchronized void execute(Runnable command) { if (shuttingDown) { throw new FatalRejectedExecutionException("Cannot execute the command " + command + ". The executor service is shutting down"); } this.tasks.add(command); // If we haven't been scheduled yet, do so now if (!scheduled) { scheduled = true; try { // Submit task in the async mode ExecutorServiceUtils.submitAsync(base, runner); } catch (ExecutorServiceUtils.ExecutionRejectedException ex) { // Wrap by the runtime exception since there is no other solution here throw new RejectedExecutionException("Base executor service " + base + " has rejected the task " + command, ex); } } }
ExecutorServiceUtils.submitAsync(base, this); } catch (ExecutorServiceUtils.ExecutionRejectedException ex) {
ExecutorServiceUtils.submitAsync(downloader, new DownloadRunnable(channel, sum1, sum2, key, promise));
assert packetSize==0; if (packet.length > 0) { ExecutorServiceUtils.submitAsync(t.swimLane, new Runnable() { @Override public void run() { ExecutorServiceUtils.submitAsync(t.swimLane, new Runnable() { @Override public void run() {