Class NewThreadScheduler


  • public final class NewThreadScheduler
    extends Scheduler
    Schedules work on a new thread.
    • Field Detail

      • threadFactory

        final java.util.concurrent.ThreadFactory threadFactory
      • THREAD_NAME_PREFIX

        private static final java.lang.String THREAD_NAME_PREFIX
        See Also:
        Constant Field Values
      • KEY_NEWTHREAD_PRIORITY

        private static final java.lang.String KEY_NEWTHREAD_PRIORITY
        The name of the system property for setting the thread priority for this Scheduler.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NewThreadScheduler

        public NewThreadScheduler()
      • NewThreadScheduler

        public NewThreadScheduler​(java.util.concurrent.ThreadFactory threadFactory)
    • Method Detail

      • createWorker

        @NonNull
        public @NonNull Scheduler.Worker createWorker()
        Description copied from class: Scheduler
        Retrieves or creates a new Scheduler.Worker that represents sequential execution of actions.

        When work is completed, the Worker instance should be released by calling Disposable.dispose() to avoid potential resource leaks in the underlying task-execution scheme.

        Work on a Scheduler.Worker is guaranteed to be sequential and non-overlapping.

        Specified by:
        createWorker in class Scheduler
        Returns:
        a Worker representing a serial queue of actions to be executed