Lines Matching refs:executor

45  * <p>This class uses the {@link ScheduledExecutorService} returned from {@link #executor} to run
125 public Future<?> schedule(AbstractService service, ScheduledExecutorService executor,
127 return executor.scheduleWithFixedDelay(task, initialDelay, delay, unit);
144 public Future<?> schedule(AbstractService service, ScheduledExecutorService executor,
146 return executor.scheduleAtFixedRate(task, initialDelay, period, unit);
151 /** Schedules the task to run on the provided executor on behalf of the service. */
152 abstract Future<?> schedule(AbstractService service, ScheduledExecutorService executor,
191 executorService = MoreExecutors.renamingDecorator(executor(), new Supplier<String>() {
274 * executor will not be {@linkplain ScheduledExecutorService#shutdown shutdown} when this
286 protected ScheduledExecutorService executor() {
287 final ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(
293 // Add a listener to shutdown the executor after the service is stopped. This ensures that the
300 executor.shutdown();
303 executor.shutdown();
306 return executor;
334 @Override public final void addListener(Listener listener, Executor executor) {
335 delegate.addListener(listener, executor);
408 /** The executor on which this Callable will be scheduled. */
409 private final ScheduledExecutorService executor;
428 ReschedulableCallable(AbstractService service, ScheduledExecutorService executor,
431 this.executor = executor;
454 currentFuture = executor.schedule(this, schedule.delay, schedule.unit);
488 final Future<?> schedule(AbstractService service, ScheduledExecutorService executor,
490 ReschedulableCallable task = new ReschedulableCallable(service, executor, runnable);