Interface ListeningScheduledExecutorService
-
- All Superinterfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
,ListeningExecutorService
,java.util.concurrent.ScheduledExecutorService
- All Known Implementing Classes:
MoreExecutors.ScheduledListeningDecorator
,SameThreadScheduledExecutorService
,TestingExecutors.NoOpScheduledExecutorService
public interface ListeningScheduledExecutorService extends java.util.concurrent.ScheduledExecutorService, ListeningExecutorService
AScheduledExecutorService
that returnsListenableFuture
instances from itsExecutorService
methods. To create an instance from an existingScheduledExecutorService
, callMoreExecutors.listeningDecorator(ScheduledExecutorService)
.- Since:
- 10.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ListenableScheduledFuture<?>
schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
default ListenableScheduledFuture<?>
schedule(java.lang.Runnable command, java.time.Duration delay)
Duration-based overload ofschedule(Runnable, long, TimeUnit)
.<V> ListenableScheduledFuture<V>
schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
default <V> ListenableScheduledFuture<V>
schedule(java.util.concurrent.Callable<V> callable, java.time.Duration delay)
Duration-based overload ofschedule(Callable, long, TimeUnit)
.ListenableScheduledFuture<?>
scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
default ListenableScheduledFuture<?>
scheduleAtFixedRate(java.lang.Runnable command, java.time.Duration initialDelay, java.time.Duration period)
Duration-based overload ofscheduleAtFixedRate(Runnable, long, long, TimeUnit)
.ListenableScheduledFuture<?>
scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
default ListenableScheduledFuture<?>
scheduleWithFixedDelay(java.lang.Runnable command, java.time.Duration initialDelay, java.time.Duration delay)
Duration-based overload ofscheduleWithFixedDelay(Runnable, long, long, TimeUnit)
.
-
-
-
Method Detail
-
schedule
ListenableScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
schedule
in interfacejava.util.concurrent.ScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
schedule
default ListenableScheduledFuture<?> schedule(java.lang.Runnable command, java.time.Duration delay)
Duration-based overload ofschedule(Runnable, long, TimeUnit)
.- Since:
- 29.0
-
schedule
<V> ListenableScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
schedule
in interfacejava.util.concurrent.ScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
schedule
default <V> ListenableScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, java.time.Duration delay)
Duration-based overload ofschedule(Callable, long, TimeUnit)
.- Since:
- 29.0
-
scheduleAtFixedRate
ListenableScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interfacejava.util.concurrent.ScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
scheduleAtFixedRate
default ListenableScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, java.time.Duration initialDelay, java.time.Duration period)
Duration-based overload ofscheduleAtFixedRate(Runnable, long, long, TimeUnit)
.- Since:
- 29.0
-
scheduleWithFixedDelay
ListenableScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interfacejava.util.concurrent.ScheduledExecutorService
- Since:
- 15.0 (previously returned ScheduledFuture)
-
scheduleWithFixedDelay
default ListenableScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, java.time.Duration initialDelay, java.time.Duration delay)
Duration-based overload ofscheduleWithFixedDelay(Runnable, long, long, TimeUnit)
.- Since:
- 29.0
-
-