Class 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 Detail

      • DEFAULT_TTL_MILLIS

        public static final long DEFAULT_TTL_MILLIS
    • Constructor Detail

      • CachedSingleThreadScheduler

        public CachedSingleThreadScheduler()
      • CachedSingleThreadScheduler

        public CachedSingleThreadScheduler​(long ttlMillis)