scalation.coroutine

PriorityScheduler

case class PriorityScheduler() extends Scheduler with Product with Serializable

This PriorityScheduler class provides a coroutine scheduler implementation that is backed by an instance of the PriorityQueue [Coroutine] class.

Linear Supertypes
Serializable, Serializable, Product, Equals, Scheduler, Coroutine, Ordered[Coroutine], Comparable[Coroutine], PQItem, Identifiable, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PriorityScheduler
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Scheduler
  7. Coroutine
  8. Ordered
  9. Comparable
  10. PQItem
  11. Identifiable
  12. Error
  13. AnyRef
  14. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PriorityScheduler()

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def <(that: Coroutine): Boolean

    Definition Classes
    Ordered
  5. def <=(that: Coroutine): Boolean

    Definition Classes
    Ordered
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. def >(that: Coroutine): Boolean

    Definition Classes
    Ordered
  9. def >=(that: Coroutine): Boolean

    Definition Classes
    Ordered
  10. var _clock: Double

    The clock that keep track of the current scheduling time.

    The clock that keep track of the current scheduling time.

    Attributes
    protected
    Definition Classes
    Scheduler
  11. var _current: Coroutine

    The currently executing coroutine (execute one at a time).

    The currently executing coroutine (execute one at a time).

    Attributes
    protected
    Definition Classes
    Scheduler
  12. var actTime: Double

    The activation time for the item in the time-ordered priority queue

    The activation time for the item in the time-ordered priority queue

    Definition Classes
    PQItem
  13. val agenda: PriorityQueue[Coroutine]

    The future event list.

    The future event list.

    Attributes
    protected
  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. final def clock(): Double

    The current value of the Scheduler's clock.

    The current value of the Scheduler's clock.

    Definition Classes
    Scheduler
  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def compare(other: Coroutine): Int

    Compare the activation times of the two coroutines.

    Compare the activation times of the two coroutines.

    Definition Classes
    Coroutine → Ordered
  18. def compare(other: PQItem): Int

    Compare two items (PQItems) based on their actTime.

    Compare two items (PQItems) based on their actTime.

    other

    the other item to compare with this item

    Definition Classes
    PQItem
  19. def compareTo(that: Coroutine): Int

    Definition Classes
    Ordered → Comparable
  20. final def end(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    Terminates the coroutine, regardless of state.

    Terminates the coroutine, regardless of state.

    Definition Classes
    Coroutine
  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identifiable
  26. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  27. def me: String

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identifiable
  28. def name: String

    Get the name.

    Get the name.

    Definition Classes
    Identifiable
  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

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

    Definition Classes
    AnyRef
  32. final def pause(delay: Int, scheduler: Scheduler = Coroutine.defaultScheduler): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    If the coroutine is running, suspends the coroutine for a certain amount of time.

    If the coroutine is running, suspends the coroutine for a certain amount of time. If the coroutine is suspended, then begin execution again after a certain amount of time. Time units depend on the coroutine scheduler. If no coroutine scheduler is provided then the default, Coroutine.defaultScheduler, is used.

    delay

    time delay before the coroutine is resumed

    scheduler

    the coroutine scheduler

    Definition Classes
    Coroutine
  33. def postRun(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    When the coroutine is finished executing its run function, this function is executed.

    When the coroutine is finished executing its run function, this function is executed.

    Definition Classes
    Coroutine
  34. def preRun(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    When the coroutine is started, this function is executed before the run function.

    When the coroutine is started, this function is executed before the run function.

    Definition Classes
    Coroutine
  35. def reschedule(coroutine: Coroutine): Unit

    Implements for Scheduler mixin.

    Implements for Scheduler mixin.

    coroutine

    the coroutine to be scheduled

    Definition Classes
    PrioritySchedulerScheduler
  36. final def restart(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    Causes this coroutine to restart execution.

    Causes this coroutine to restart execution. If another coroutine is currently being executed, then that coroutine is suspended before this one is executed. If this coroutine has not already been started, then this has the same effect as the run function. It is important to note that the state from any previous execution of this coroutine is not saved.

    Definition Classes
    Coroutine
  37. final def resume(): Unit

    If the coroutine is suspended, it is resumed and continues its execution.

    If the coroutine is suspended, it is resumed and continues its execution.

    If the coroutine is in some other state, the behavior of this function is to be treated as undefined.

    Definition Classes
    Coroutine
  38. def run(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    The scheduler itself is a coroutine and may be thought of as the director.

    The scheduler itself is a coroutine and may be thought of as the director. The director iteratively manages the clock and the agenda of coroutines until the agenda becomes empty.

    Definition Classes
    PrioritySchedulerCoroutine
  39. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identifiable
  40. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

    Definition Classes
    Identifiable
  41. final def start(): Unit

    Causes this coroutine to begin execution.

    Causes this coroutine to begin execution. If another coroutine is currently being executed, then that coroutine is suspended before this one is executed. If this coroutine has already been started, then this has the same effect as the restart function.

    Definition Classes
    Coroutine
  42. def state(): State

    Current state of the coroutine.

    Current state of the coroutine.

    Definition Classes
    Coroutine
  43. final def suspend(): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    If the coroutine is running, it is suspended and makes no further progress unless and until it is resumed.

    If the coroutine is running, it is suspended and makes no further progress unless and until it is resumed.

    If the coroutine is in some other state, the behavior of this function is to be treated as undefined.

    Definition Classes
    Coroutine
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  45. def toString(): String

    Convert the item (PQItem) to a string.

    Convert the item (PQItem) to a string.

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def yieldToCoroutine(coroutine: Coroutine): Unit @scala.util.continuations.cpsParam[Unit,Unit]

    If the coroutine is running, suspend execution indefinitely and yield to another coroutine.

    If the coroutine is running, suspend execution indefinitely and yield to another coroutine. If the other coroutine has never been started, then it is started.

    If the coroutine is in some other state, the behavior of this function is to be treated as undefined.

    coroutine

    the coroutine to yield to

    Definition Classes
    Coroutine

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Scheduler

Inherited from Coroutine

Inherited from Ordered[Coroutine]

Inherited from Comparable[Coroutine]

Inherited from PQItem

Inherited from Identifiable

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped