Interface Stage

All Superinterfaces:
Executor, Schedule
All Known Subinterfaces:
MainStage
All Known Implementing Classes:
AgentModel, AgentNode, MetaEdgeAgent, MetaHostAgent, MetaLaneAgent, MetaMeshAgent, MetaPartAgent, SideStage, Theater

public interface Stage extends Executor, Schedule
An execution context in which to schedule tasks, create continuation calls, and set timers. Stage is thread safe.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Call<T>
    call(Cont<T> cont)
    Returns a Call that completes the continuation.
    void
    execute(Runnable runnable)
    Schedules a runnable for concurrent execution.
    Returns an uncued TaskRef bound to the task, which can later be used to cue the task.

    Methods inherited from interface swim.concurrent.Schedule

    setTimer, timer
  • Method Details

    • task

      TaskRef task(TaskFunction task)
      Returns an uncued TaskRef bound to the task, which can later be used to cue the task.
    • call

      <T> Call<T> call(Cont<T> cont)
      Returns a Call that completes the continuation.
    • execute

      void execute(Runnable runnable)
      Schedules a runnable for concurrent execution.
      Specified by:
      execute in interface Executor