Class GuardedScheduler
- java.lang.Object
-
- com.github.benmanes.caffeine.cache.GuardedScheduler
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Scheduler
delegate
(package private) static java.util.logging.Logger
logger
(package private) static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description GuardedScheduler(Scheduler delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull java.util.concurrent.Future<?>
schedule(@NonNull java.util.concurrent.Executor executor, @NonNull java.lang.Runnable command, long delay, @NonNull java.util.concurrent.TimeUnit unit)
Returns a future that will submit the task to the given executor after the given delay.
-
-
-
Field Detail
-
logger
static final java.util.logging.Logger logger
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
delegate
final Scheduler delegate
-
-
Constructor Detail
-
GuardedScheduler
GuardedScheduler(Scheduler delegate)
-
-
Method Detail
-
schedule
public @NonNull java.util.concurrent.Future<?> schedule(@NonNull java.util.concurrent.Executor executor, @NonNull java.lang.Runnable command, long delay, @NonNull java.util.concurrent.TimeUnit unit)
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
-
-