io.reactors

Scheduler

object Scheduler

Companion object for creating standard reactor schedulers.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Scheduler
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract class Dedicated extends Scheduler

    An abstract scheduler that always dedicates a thread to a reactor.

  2. class Executed extends Scheduler

    A Scheduler that reuses the target Java Executor.

    A Scheduler that reuses the target Java Executor.

    It checks if the specified executor is a ForkJoinPool that uses ReactorForkJoinWorkerThread and, if so, applies additional optimizations:

    • If schedule is called from a ForkJoinWorkerThread that belongs to the ForkJoinPool that is the executor, then a more lightweight mechanism is used to schedule the task.
    • When a frame completes execution, it calls unschedule. This will attempt to remove submitted tasks from the ForkJoinPool a certain of times and execute them directly. The scheduler.default.unschedule-count bundle configuration key is the maximum number of attempts. If removing is not successful, this immediately stops.
    • Each ReactorForkJoinWorkerThread has an associated mini-queue into which it stores at most one scheduled Frame. Any frame must first be in the mini-queue before getting converted into a task and sent to the queue. Before any such worker thread returns control to the pool, it must flush its mini-queue. Simultaneously, there is a reanimator thread that periodically traverses the mini-queues of all the threads, and flushes them if necessary.
  3. type Handler = PartialFunction[Throwable, Unit]

  4. trait State extends AnyRef

    Superclass for the information objects that a scheduler attaches to a reactor frame.

  5. class Timer extends Scheduler

    Executes the reactor on the timer thread.

    Executes the reactor on the timer thread.

    The reactor is run every period milliseconds. This is regardless of the number of events in this reactor's event queue.

    When the reactor runs, it flushes as many events as there are initially pending events.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. object Dedicated

    Contains utility classes and implementations of the dedicated scheduler.

  5. object State

  6. object Timer

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. lazy val default: Scheduler

    Default reactor scheduler.

  10. lazy val defaultForkJoinPool: ForkJoinPool

    Default fork/join pool instance used by the default scheduler.

  11. val defaultHandler: Handler

    The default handler prints the exception to the standard error stream.

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. lazy val globalExecutionContext: Scheduler

    Scheduler that shares the global Scala execution context.

  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. lazy val newThread: Scheduler

    A scheduler that always starts a reactor on a dedicated thread.

  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. lazy val piggyback: Scheduler

    A scheduler that reuses (piggybacks) the current thread to run the reactor.

    A scheduler that reuses (piggybacks) the current thread to run the reactor.

    Until the reactor terminates, the current thread is blocked and cannot be used any more. This scheduler cannot be used to start reactors from within another reactor, and is typically used to turn the application main thread into a reactor.

    See also

    org.reactors.Scheduler.Dedicated.Piggyback

  24. val silentHandler: Handler

    Silent handler ignores exceptions.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped