Class ExecutorServiceScheduler
java.lang.Object
com.github.benmanes.caffeine.cache.ExecutorServiceScheduler
- All Implemented Interfaces:
Scheduler
,Serializable
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Logger
(package private) final ScheduledExecutorService
(package private) static final long
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
logger
-
serialVersionUID
static final long serialVersionUID- See Also:
-
scheduledExecutorService
-
-
Constructor Details
-
ExecutorServiceScheduler
ExecutorServiceScheduler(ScheduledExecutorService scheduledExecutorService)
-
-
Method Details
-
schedule
Description copied from interface:Scheduler
Returns a future that will submit the task to the given executor after the given delay.- Specified by:
schedule
in interfaceScheduler
- Parameters:
executor
- the executor to run the taskcommand
- the runnable task to scheduledelay
- how long to delay, in units ofunit
unit
- aTimeUnit
determining how to interpret thedelay
parameter- Returns:
- a scheduled future representing pending submission of the task
-