com.workflowfm.proter.events

Type members

Classlikes

class CounterHandler extends ResultHandler[Int]

A ResultHandler that counts the events seen.

A ResultHandler that counts the events seen.

case
class EDone(source: String, time: Long) extends Event

The entire simulation is complete.

The entire simulation is complete.

case
class EError(source: String, time: Long, error: String) extends Event

An error or exception occurred during the simulation.

An error or exception occurred during the simulation.

Value Params
error

A string representation of the error.

case
class EResourceAdd(source: String, time: Long, name: String, costPerTick: Double) extends Event

A TaskResource was added.

A TaskResource was added.

Value Params
costPerTick

The TaskResource.costPerTick of the resource.

name

The name of the resource.

case
class ESimAdd(source: String, time: Long, name: String, start: Long) extends Event

A simulation was added.

A simulation was added.

Value Params
name

The name of the simulation.

start

The timestamp when this simulation is scheduled to start.

case
class ESimEnd(source: String, time: Long, name: String, result: String) extends Event

A simulation was finished.

A simulation was finished.

Value Params
name

The name of the simulation.

result

The output of the simulation (if any).

case
class ESimStart(source: String, time: Long, name: String) extends Event

A simulation was started.

A simulation was started.

Value Params
name

The name of the simulation.

case
class EStart(source: String, time: Long) extends Event

The entire simulation started.

The entire simulation started.

case
class ETaskAbort(source: String, time: Long, id: UUID) extends Event

A Task was aborted.

A Task was aborted.

Value Params
id

The UUID of the TaskInstance that was aborted.

case
class ETaskAdd(source: String, time: Long, task: TaskInstance) extends Event

A new Task was added in the queue.

A new Task was added in the queue.

Value Params
task

The TaskInstance that was added.

case
class ETaskAttach(source: String, time: Long, task: TaskInstance, resource: String) extends Event

A TaskInstance was attached to a TaskResource as it started.

A TaskInstance was attached to a TaskResource as it started.

Value Params
resource

The involved TaskResource.

task

The TaskInstance that was attached.

case
class ETaskDetach(source: String, time: Long, task: TaskInstance, resource: String, cost: Double) extends Event

A TaskInstance was detached from a TaskResource as it finished.

A TaskInstance was detached from a TaskResource as it finished.

Value Params
cost

The resource cost associated with this task and resource.

resource

The involved TaskResource.

task

The TaskInstance that was detached.

case
class ETaskDone(source: String, time: Long, task: TaskInstance) extends Event

A TaskInstance has finished.

A TaskInstance has finished.

Value Params
task

The TaskInstance that finished.

case
class ETaskStart(source: String, time: Long, task: TaskInstance) extends Event

A TaskInstance was started.

A TaskInstance was started.

Value Params
task

The TaskInstance that was started.

sealed
trait Event

Output events generated from a Publisher during a simulation.

Output events generated from a Publisher during a simulation.

These are events taking place during the full simulation. They can be used for logging and result analysis.

Companion
object
object Event
Companion
class

A handler of Events.

A handler of Events.

Handles a stream of events from a Publisher.

Publisher implementation using a HashMap of subscribers.

Publisher implementation using a HashMap of subscribers.

An EventHandler for a pool of Coordinators.

An EventHandler for a pool of Coordinators.

An EventHandler that prints events to standard error.

An EventHandler that prints events to standard error.

class PromiseHandler[R](handler: ResultHandler[R]) extends ResultHandler[R]

A wrapper for a ResultHandler that fulfills a Promise with the result.

A wrapper for a ResultHandler that fulfills a Promise with the result.

This is also itself a ResultHandler.

Value Params
handler

The ResultHandler that calculates the result.

Companion
object
Companion
class
trait Publisher

A publisher of a stream of simulation Events.

A publisher of a stream of simulation Events.

trait ResultHandler[R] extends EventHandler

An EventHandler with a measured result.

An EventHandler with a measured result.

Type Params
R

The type of the result.

class SimulationResultHandler(name: String, callback: String => Unit) extends ResultHandler[Option[String]]

Listens for the end of a named simulation and handles its result.

Listens for the end of a named simulation and handles its result.

Value Params
callback

A function to handle the results of the simulation when it completes.

name

The name of the SimulationRef to listen for.