Class

edu.umass.cs.automan.core.scheduler

Scheduler

Related Doc: package scheduler

Permalink

class Scheduler extends AnyRef

Controls scheduling of tasks for a given question.

Note on virtual ticks: 1. The user supplies mock answers, each with a delay_in_s parameter. 2. When the scheduler starts up, if a question comes with mock answers, the scheduler knows that it should use virtual ticks. 3. For each "tick group" (the set of answers with the same delay_in_s), the scheduler advances exactly one loop iteration. 4. When the scheduler calls backend operations, it forwards the current time, virtual or otherwise. The backend should only return answered thunks when the current time is after the time of the response.

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

Instance Constructors

  1. new Scheduler(question: Question, backend: AutomanAdapter)

    Permalink

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def accept_reject_and_cancel[A](all_tasks: List[Task], strategy: ValidationPolicy, backend: AutomanAdapter): List[Task]

    Permalink

    Accepts and rejects tasks on the backend.

    Accepts and rejects tasks on the backend. Returns all tasks.

    all_tasks

    All tasks.

    strategy

    The ValidationStrategy.

    backend

    A reference to the backend AutomanAdapter.

    returns

    The tasks passed in, with new states.

  5. def all_set_invariant[A](before: List[Task], after: List[Task], state: SchedulerState.Value): Boolean

    Permalink

    Returns true if all of the tasks from the before list are set to the given state in the after list.

    Returns true if all of the tasks from the before list are set to the given state in the after list.

    before

    A list of tasks.

    after

    A list of tasks.

    state

    The state to check.

    returns

    True if the invariant holds.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val backend: AutomanAdapter

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. val init_time: Date

    Permalink
  15. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def post_as_needed(tasks: List[Task], backend: AutomanAdapter, question: Question, suffered_timeout: Boolean, blacklist: List[String]): List[Task]

    Permalink

    Post new tasks if needed.

    Post new tasks if needed. Returns only newly-created tasks.

    tasks

    The complete list of tasks.

    question

    Question data.

    suffered_timeout

    True if any tasks suffered a timeout on the last iteration.

    returns

    A list of newly-created tasks.

  20. def process_timeouts(ts: List[Task], current_tick: Long): (List[Task], Boolean)

    Permalink
  21. val question: Question

    Permalink
  22. def retrieve_invariant[A](running: List[Task], answered: List[Task]): Boolean

    Permalink

    Given a list of RUNNING tasks and a list of tasks returned from the AutomanAdapter.retrieve method, ensure that a number of invariants hold.

    Given a list of RUNNING tasks and a list of tasks returned from the AutomanAdapter.retrieve method, ensure that a number of invariants hold.

    running

    A list of RUNNING tasks.

    answered

    A list of tasks returned by the AutomanAdapter.retrieve method.

    returns

    True if all invariants hold.

  23. def run(): AA

    Permalink

    Crowdsources a task on the desired backend, scheduling and rescheduling enough jobs until the chosen quality-control mechanism is confident in the result, and paying for answers where appropriate.

  24. def spawn_invariant[A](new_tasks: List[Task]): Boolean

    Permalink

    The list of newly-spawned tasks should never be zero.

    The list of newly-spawned tasks should never be zero.

    new_tasks

    A list of newly-spawned tasks.

    returns

    True if the invariant holds.

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

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def total_cost[A](tasks: List[Task]): BigDecimal

    Permalink

    Calculates the total cost of all tasks that might potentially be accepted.

    Calculates the total cost of all tasks that might potentially be accepted.

    tasks

    The complete list of tasks.

    returns

    The amount spent.

  28. val use_virt: Boolean

    Permalink
  29. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped