Packages

c

com.workflowfm.pew.execution

SingleStateExecutor

class SingleStateExecutor extends ProcessExecutor[Int] with SimplePiObservable[Int]

Executes any PiProcess asynchronously. Only holds a single state, so can only execute one workflow at a time.

Running a second workflow after one has finished executing can be risky because promises/futures from the first workflow can trigger changes on the state!

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SingleStateExecutor
  2. SimplePiObservable
  3. PiPublisher
  4. PiObservable
  5. ProcessExecutor
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SingleStateExecutor()(implicit executionContext: ExecutionContext = ExecutionContext.global)

Type Members

  1. case class Switch(name: String) extends PiSwitch with Product with Serializable
    Definition Classes
    SimplePiObservable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to any2stringadd[SingleStateExecutor] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (SingleStateExecutor, B)
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to ArrowAssoc[SingleStateExecutor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. 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
  8. 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
  9. 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
  10. 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
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. var ctr: Int
  13. def ensuring(cond: (SingleStateExecutor) ⇒ Boolean, msg: ⇒ Any): SingleStateExecutor
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to Ensuring[SingleStateExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (SingleStateExecutor) ⇒ Boolean): SingleStateExecutor
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to Ensuring[SingleStateExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: ⇒ Any): SingleStateExecutor
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to Ensuring[SingleStateExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): SingleStateExecutor
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to Ensuring[SingleStateExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. 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
  20. 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
  21. implicit val executionContext: ExecutionContext
  22. def failure(inst: PiInstance[Int]): Unit
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to StringFormat[SingleStateExecutor] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def handleThread(i: PiInstance[Int])(ref: Int, f: PiFuture): Boolean
  27. val handlers: Map[String, PiEventHandler[Int]]
    Attributes
    protected
    Definition Classes
    SimplePiObservable
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. 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
    SingleStateExecutorProcessExecutor
  30. 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
  31. var instance: Option[PiInstance[Int]]
  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. def postResult(id: Int, ref: Int, res: PiObject): Unit
  37. def publish(evt: PiEvent[Int]): Unit
    Definition Classes
    SimplePiObservablePiPublisher
  38. final def run: Unit
  39. 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

    Attributes
    protected
    Definition Classes
    SingleStateExecutorProcessExecutor
  40. def subscribe(handler: PiEventHandler[Int]): Future[PiSwitch]

    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
    SimplePiObservablePiObservable
  41. def success(id: Int, res: Any): Unit
  42. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  43. def toString(): String
    Definition Classes
    AnyRef → Any
  44. def unsubscribe(handlerName: String): Future[Boolean]
    Definition Classes
    SimplePiObservable
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  48. def [B](y: B): (SingleStateExecutor, B)
    Implicit
    This member is added by an implicit conversion from SingleStateExecutor to ArrowAssoc[SingleStateExecutor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from SimplePiObservable[Int]

Inherited from PiPublisher[Int]

Inherited from PiObservable[Int]

Inherited from ProcessExecutor[Int]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from SingleStateExecutor to any2stringadd[SingleStateExecutor]

Inherited by implicit conversion StringFormat from SingleStateExecutor to StringFormat[SingleStateExecutor]

Inherited by implicit conversion Ensuring from SingleStateExecutor to Ensuring[SingleStateExecutor]

Inherited by implicit conversion ArrowAssoc from SingleStateExecutor to ArrowAssoc[SingleStateExecutor]

Ungrouped