Class CachedSingleThreadScheduler

java.lang.Object
org.springframework.cloud.kubernetes.commons.leader.election.CachedSingleThreadScheduler

public final class CachedSingleThreadScheduler extends Object
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 Details

    • CachedSingleThreadScheduler

      public CachedSingleThreadScheduler(String name, long ttlMillis)
  • Method Details