Class CachedSingleThreadScheduler
- java.lang.Object
-
- io.fabric8.kubernetes.client.utils.CachedSingleThreadScheduler
-
public class CachedSingleThreadScheduler extends Object
Maintains a single thread daemon scheduler, which will terminate the thread when not in use.
It is not intended for long-running tasks, but it does not assume the task can be handed off to the common pool
This is very similar to the CompletableFuture.Delayer, but provides a scheduler method
-
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_TTL_MILLIS
-
Constructor Summary
Constructors Constructor Description CachedSingleThreadScheduler()
CachedSingleThreadScheduler(long ttlMillis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduledFuture<?>
schedule(Runnable command, long delay, TimeUnit unit)
ScheduledFuture<?>
scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
-
-
-
Method Detail
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
-
schedule
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
-
-