abstract class PiSimulation extends MutexExecutor with AsyncSimulation with FutureTasks
- Alphabetic
- By Inheritance
- PiSimulation
- FutureTasks
- AsyncSimulation
- Simulation
- SimulationRef
- MutexExecutor
- SimplePiObservable
- PiPublisher
- PiObservable
- ProcessExecutor
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PiSimulation(name: String, manager: Manager)(implicit executionContext: ExecutionContext)
Type Members
-
type
Callback = (Try[(TaskInstance, Long)]) ⇒ Unit
- Definition Classes
- AsyncSimulation
-
case class
Switch(name: String) extends PiSwitch with Product with Serializable
- Definition Classes
- SimplePiObservable
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from PiSimulation to any2stringadd[PiSimulation] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (PiSimulation, B)
- Implicit
- This member is added by an implicit conversion from PiSimulation to ArrowAssoc[PiSimulation] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
abort(ids: UUID*): Unit
- Definition Classes
- AsyncSimulation → Simulation
-
val
aborted: HashSet[UUID]
- Attributes
- protected
- Definition Classes
- Simulation
-
def
ack(taskIDs: Seq[UUID]): Unit
- Definition Classes
- Simulation
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
call[H <: PiEventHandler[Int]](instance: PiInstance[_], factory: PiEventHandlerFactory[Int, H]): Future[H]
A
init ; start
sequence that gives us a chance to subscribe a listener that is specific to this execution.A
init ; start
sequence that gives us a chance to subscribe a listener that is specific to this execution. A new ID will be generated for the PiInstance to ensure freshness.- instance
The PiInstance to be executed
- factory
A PiEventHandlerFactory which generates PiEventHandler's for a given ID
- returns
A Future with the PiEventHandler that was generated
- Definition Classes
- ProcessExecutor
-
def
call[H <: PiEventHandler[Int]](process: PiProcess, args: Seq[Any], factory: PiEventHandlerFactory[Int, H]): Future[H]
A
init ; start
sequence that gives us a chance to subscribe a listener that is specific to this execution.A
init ; start
sequence that gives us a chance to subscribe a listener that is specific to this execution.- process
The (atomic or composite) PiProcess to be executed
- args
The (real) arguments to be passed to the process
- factory
A PiEventHandlerFactory which generates PiEventHandler's for a given ID
- returns
A Future with the PiEventHandler that was generated
- Definition Classes
- ProcessExecutor
-
def
call(instance: PiInstance[_]): Future[Int]
A simple
init ; start
sequence when we do not need any even listeners.A simple
init ; start
sequence when we do not need any even listeners. A new ID will be generated for the PiInstance to ensure freshness.- instance
The PiInstance to be executed
- returns
A Future with the ID corresponding to this execution
- Definition Classes
- ProcessExecutor
-
def
call(process: PiProcess, args: Seq[Any]): Future[Int]
A simple
init ; start
sequence when we do not need any even listeners.A simple
init ; start
sequence when we do not need any even listeners.- process
The (atomic or composite) PiProcess to be executed
- args
The (real) arguments to be passed to the process
- returns
A Future with the ID corresponding to this execution
- Definition Classes
- ProcessExecutor
-
def
callback(f: (TaskInstance, Long) ⇒ Unit): Callback
- Definition Classes
- AsyncSimulation
-
def
clear(): Unit
- Attributes
- protected
- Definition Classes
- Simulation
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
complete(task: TaskInstance, time: Long): Unit
- Definition Classes
- AsyncSimulation → Simulation
-
def
completed(time: Long, tasks: Seq[TaskInstance]): Unit
- Definition Classes
- PiSimulation → Simulation → SimulationRef
-
var
ctr: Int
- Definition Classes
- MutexExecutor
-
def
done(result: Try[Any]): Unit
- Definition Classes
- Simulation
-
def
ensuring(cond: (PiSimulation) ⇒ Boolean, msg: ⇒ Any): PiSimulation
- Implicit
- This member is added by an implicit conversion from PiSimulation to Ensuring[PiSimulation] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (PiSimulation) ⇒ Boolean): PiSimulation
- Implicit
- This member is added by an implicit conversion from PiSimulation to Ensuring[PiSimulation] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): PiSimulation
- Implicit
- This member is added by an implicit conversion from PiSimulation to Ensuring[PiSimulation] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): PiSimulation
- Implicit
- This member is added by an implicit conversion from PiSimulation to Ensuring[PiSimulation] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
execute(instance: PiInstance[_]): Future[Any]
Executes a PiInstance with a PromiseHandler A new ID will be generated for the PiInstance to ensure freshness.
Executes a PiInstance with a PromiseHandler A new ID will be generated for the PiInstance to ensure freshness.
- returns
A Future with the result of the executed process
- Definition Classes
- ProcessExecutor
-
def
execute(process: PiProcess, args: Seq[Any]): Future[Any]
Executes a process with a PromiseHandler
Executes a process with a PromiseHandler
- returns
A Future with the result of the executed process
- Definition Classes
- ProcessExecutor
-
implicit
val
executionContext: ExecutionContext
- Definition Classes
- PiSimulation → MutexExecutor → SimplePiObservable → ProcessExecutor
-
def
fail(exception: Throwable): Unit
- Definition Classes
- Simulation
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from PiSimulation to StringFormat[PiSimulation] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
def
futureTask(t: Task): Future[(TaskInstance, Long)]
- Definition Classes
- FutureTasks
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getLookahead(): Lookahead
- Definition Classes
- Simulation
- def getProcesses(): Seq[PiProcess]
-
def
handleThread(i: PiInstance[Int])(ref: Int, f: PiFuture): Boolean
- Definition Classes
- MutexExecutor
-
val
handlers: Map[String, PiEventHandler[Int]]
- Attributes
- protected
- Definition Classes
- SimplePiObservable
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
init(instance: PiInstance[_]): Future[Int]
Initializes a PiInstance for a process execution.
Initializes a PiInstance for a process execution. A new ID will be generated for the PiInstance to ensure freshness. This is always and only invoked before a
start
, hence why it is protected. This separation gives a chance to PiEventHandlers to subscribe before execution starts.- instance
The PiInstance to be executed
- returns
A Future with the new unique ID that was generated
- Attributes
- protected
- Definition Classes
- MutexExecutor → ProcessExecutor
-
def
init(process: PiProcess, args: Seq[PiObject]): Future[Int]
Initializes a PiProcess call for a process execution.
Initializes a PiProcess call for a process execution. This is always and only invoked before a
start
, hence why it is protected. This separation gives a chance to PiEventHandlers to subscribe before execution starts.- process
The (atomic or composite) PiProcess to be executed
- args
The PiObject arguments to be passed to the process
- returns
A Future with the new unique ID that was generated
- Attributes
- protected
- Definition Classes
- ProcessExecutor
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
manager: Manager
- Attributes
- protected
- Definition Classes
- PiSimulation → Simulation
-
val
name: String
- Definition Classes
- PiSimulation → SimulationRef
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
postResult(id: Int, ref: Int, res: PiObject): Unit
- Definition Classes
- MutexExecutor
- def processResuming(process: String): Unit
- def processWaiting(process: String): Unit
- val procsWaiting: Queue[String]
-
def
publish(evt: PiEvent[Int]): Unit
- Definition Classes
- PiSimulation → SimplePiObservable → PiPublisher
-
def
ready(): Unit
- Definition Classes
- Simulation
-
def
readyCheck(): Unit
- Attributes
- protected
-
def
run(): Unit
- Definition Classes
- PiSimulation → SimulationRef
-
final
def
run(id: Int, f: (PiInstance[Int]) ⇒ PiInstance[Int]): Unit
- Definition Classes
- MutexExecutor
-
def
simWait(): Unit
- Definition Classes
- Simulation
- def simulate[T](iname: String, gen: Task, result: T): Future[T]
- def simulate[T](iname: String, gen: Task, resultFun: (TaskInstance, Long) ⇒ T): Future[T]
- val sources: Map[UUID, String]
-
def
start(id: Int): Unit
Starts the execution of an initialized PiInstance.
Starts the execution of an initialized PiInstance. This is always and only invoked after an
init
, hence why it is protected. This separation gives a chance to PiEventHandlers to subscribe before execution starts.- id
The ID of the instance to start executing
- Definition Classes
- MutexExecutor → ProcessExecutor
-
def
stop(): Unit
- Definition Classes
- AsyncSimulation → SimulationRef
-
var
store: PiInstanceStore[Int]
- Definition Classes
- MutexExecutor
-
def
subscribe(handler: PiEventHandler[Int]): Future[PiSwitch]
Subscribes a com.workflowfm.pew.stream.PiEventHandler to observe.
Subscribes a com.workflowfm.pew.stream.PiEventHandler to observe.
- handler
the handler to subscribe
- returns
the com.workflowfm.pew.stream.PiSwitch that allows us to stop/unsubscribe the subscribed handler
- Definition Classes
- SimplePiObservable → PiObservable
-
def
succeed(result: Any): Unit
- Definition Classes
- Simulation
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
task(t: Task, callback: Callback): Unit
- Definition Classes
- AsyncSimulation
-
def
task(t: Task): Unit
- Definition Classes
- Simulation
-
val
tasks: Map[UUID, Callback]
- Attributes
- protected
- Definition Classes
- AsyncSimulation
-
val
tasksToAdd: Queue[Task]
- Attributes
- protected
- Definition Classes
- Simulation
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unsubscribe(handlerName: String): Future[Boolean]
- Definition Classes
- SimplePiObservable
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
waiting: HashSet[UUID]
- Attributes
- protected
- Definition Classes
- Simulation
-
def
→[B](y: B): (PiSimulation, B)
- Implicit
- This member is added by an implicit conversion from PiSimulation to ArrowAssoc[PiSimulation] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc