Class CachedSingleThreadScheduler
java.lang.Object
org.springframework.cloud.kubernetes.commons.leader.election.CachedSingleThreadScheduler
This is taken from fabric8 with some changes (we need it, so it could be placed in the
common package). A single thread scheduler that will shutdown itself when there are no
more jobs running inside it. When all ScheduledFuture::cancel are called, the queue of
tasks will be empty and there is an internal runnable that checks that.
- Author:
- wind57
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionscheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
-
Constructor Details
-
CachedSingleThreadScheduler
-
-
Method Details
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) -
schedule
-