Class TimeScheduler3

java.lang.Object
org.jgroups.util.TimeScheduler3
All Implemented Interfaces:
Runnable, TimeScheduler

public class TimeScheduler3 extends Object implements TimeScheduler, Runnable
Implementation of TimeScheduler. Uses a DelayQueue to order tasks according to execution times
Since:
3.3
  • Field Details

    • pool

      protected Executor pool
      Thread pool used to execute the tasks
    • thread_pool

      protected ThreadPool thread_pool
    • queue

      protected final BlockingQueue<TimeScheduler3.Task> queue
      DelayQueue with tasks being sorted according to execution times (next execution first)
    • runner

      protected volatile Thread runner
      Thread which removes tasks ready to be executed from the queue and submits them to the pool for execution
    • log

      protected static final Log log
    • timer_thread_factory

      protected ThreadFactory timer_thread_factory
    • non_blocking_task_handling

      protected boolean non_blocking_task_handling
    • shut_down_pool

      protected boolean shut_down_pool
  • Constructor Details

    • TimeScheduler3

      public TimeScheduler3()
      Create a scheduler that executes tasks in dynamically adjustable intervals
    • TimeScheduler3

      public TimeScheduler3(ThreadFactory factory, int min_threads, int max_threads, long keep_alive_time, int max_queue_size, String rejection_policy)
    • TimeScheduler3

      public TimeScheduler3(ThreadFactory factory, int min_threads, int max_threads, long keep_alive_time, BlockingQueue<Runnable> queue, String rejection_policy, boolean thread_pool_enabled)
    • TimeScheduler3

      public TimeScheduler3(ThreadPool thread_pool, ThreadFactory factory, boolean start)
  • Method Details