Interface ListeningScheduledExecutorService
- All Superinterfaces:
AutoCloseable
,Executor
,ExecutorService
,ListeningExecutorService
,ScheduledExecutorService
@GwtIncompatible
public interface ListeningScheduledExecutorService
extends ScheduledExecutorService, ListeningExecutorService
A
ScheduledExecutorService
that returns ListenableFuture
instances from its
ExecutorService
methods. To create an instance from an existing ScheduledExecutorService
, call MoreExecutors.listeningDecorator(ScheduledExecutorService)
.- Since:
- 10.0
- Author:
- Chris Povirk
-
Method Summary
Modifier and TypeMethodDescriptiondefault ListenableScheduledFuture
<?> Duration-based overload ofschedule(Runnable, long, TimeUnit)
.<V extends @Nullable Object>
ListenableScheduledFuture<V> default <V extends @Nullable Object>
ListenableScheduledFuture<V> Duration-based overload ofschedule(Callable, long, TimeUnit)
.scheduleAtFixedRate
(Runnable command, long initialDelay, long period, TimeUnit unit) default ListenableScheduledFuture
<?> scheduleAtFixedRate
(Runnable command, Duration initialDelay, Duration period) Duration-based overload ofscheduleAtFixedRate(Runnable, long, long, TimeUnit)
.scheduleWithFixedDelay
(Runnable command, long initialDelay, long delay, TimeUnit unit) default ListenableScheduledFuture
<?> scheduleWithFixedDelay
(Runnable command, Duration initialDelay, Duration delay) Duration-based overload ofscheduleWithFixedDelay(Runnable, long, long, TimeUnit)
.Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, close, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
Methods inherited from interface com.google.common.util.concurrent.ListeningExecutorService
awaitTermination, invokeAll, invokeAll, invokeAll, invokeAny, submit, submit, submit
-
Method Details
-
schedule
- Specified by:
schedule
in interfaceScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
schedule
Duration-based overload ofschedule(Runnable, long, TimeUnit)
.- Since:
- 29.0
-
schedule
<V extends @Nullable Object> ListenableScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) - Specified by:
schedule
in interfaceScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
schedule
default <V extends @Nullable Object> ListenableScheduledFuture<V> schedule(Callable<V> callable, Duration delay) Duration-based overload ofschedule(Callable, long, TimeUnit)
.- Since:
- 29.0
-
scheduleAtFixedRate
ListenableScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
scheduleAtFixedRate
in interfaceScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
scheduleAtFixedRate
default ListenableScheduledFuture<?> scheduleAtFixedRate(Runnable command, Duration initialDelay, Duration period) Duration-based overload ofscheduleAtFixedRate(Runnable, long, long, TimeUnit)
.- Since:
- 29.0
-
scheduleWithFixedDelay
ListenableScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
scheduleWithFixedDelay
in interfaceScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
scheduleWithFixedDelay
default ListenableScheduledFuture<?> scheduleWithFixedDelay(Runnable command, Duration initialDelay, Duration delay) Duration-based overload ofscheduleWithFixedDelay(Runnable, long, long, TimeUnit)
.- Since:
- 29.0
-