Packages

c

com.workflowfm.pew.mongodb

MongoExecutor

class MongoExecutor extends ProcessExecutor[ObjectId] with SimplePiObservable[ObjectId]

Linear Supertypes
SimplePiObservable[ObjectId], PiPublisher[ObjectId], PiObservable[ObjectId], ProcessExecutor[ObjectId], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MongoExecutor
  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 MongoExecutor(client: MongoClient, db: String, collection: String, l: PiProcess*)
  2. new MongoExecutor(client: MongoClient, db: String, collection: String, processes: PiProcessStore)(implicit executionContext: ExecutionContext = ExecutionContext.global)

Type Members

  1. final case class CASFailureException(id: String, cause: Throwable = None.orNull) extends Exception with Product with Serializable
  2. implicit class SafeObservable[T] extends AnyRef
  3. 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 MongoExecutor to any2stringadd[MongoExecutor] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (MongoExecutor, B)
    Implicit
    This member is added by an implicit conversion from MongoExecutor to ArrowAssoc[MongoExecutor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final val CAS_MAX_ATTEMPTS: Int(10)
  7. final val CAS_WAIT_MS: Int(1)
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def call[H <: PiEventHandler[ObjectId]](instance: PiInstance[_], factory: PiEventHandlerFactory[ObjectId, 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
  10. def call[H <: PiEventHandler[ObjectId]](process: PiProcess, args: Seq[Any], factory: PiEventHandlerFactory[ObjectId, 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
  11. def call(instance: PiInstance[_]): Future[ObjectId]

    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
  12. def call(process: PiProcess, args: Seq[Any]): Future[ObjectId]

    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
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  14. val codecRegistry: CodecRegistry
  15. val col: MongoCollection[PiInstance[ObjectId]]
  16. val database: MongoDatabase
  17. def ensuring(cond: (MongoExecutor) ⇒ Boolean, msg: ⇒ Any): MongoExecutor
    Implicit
    This member is added by an implicit conversion from MongoExecutor to Ensuring[MongoExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: (MongoExecutor) ⇒ Boolean): MongoExecutor
    Implicit
    This member is added by an implicit conversion from MongoExecutor to Ensuring[MongoExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean, msg: ⇒ Any): MongoExecutor
    Implicit
    This member is added by an implicit conversion from MongoExecutor to Ensuring[MongoExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean): MongoExecutor
    Implicit
    This member is added by an implicit conversion from MongoExecutor to Ensuring[MongoExecutor] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  23. 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
  24. 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
  25. implicit val executionContext: ExecutionContext
  26. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from MongoExecutor to StringFormat[MongoExecutor] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  28. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. def handleThread(i: PiInstance[ObjectId])(ref: Int, f: PiFuture): Boolean
    Attributes
    protected
  30. val handlers: Map[String, PiEventHandler[ObjectId]]
    Attributes
    protected
    Definition Classes
    SimplePiObservable
  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  32. def init(instance: PiInstance[_]): Future[ObjectId]

    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

    Definition Classes
    MongoExecutorProcessExecutor
  33. def init(process: PiProcess, args: Seq[PiObject]): Future[ObjectId]

    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
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. final def postResult(id: ObjectId, ref: Int, res: MetadataAtomicResult): Unit
  39. def postResultUpdate(ref: Int, res: PiObject)(i: PiInstance[ObjectId]): PiInstance[ObjectId]
    Attributes
    protected
  40. def publish(evt: PiEvent[ObjectId]): Unit
    Definition Classes
    SimplePiObservablePiPublisher
  41. def put(i: PiInstance[ObjectId], ni: PiInstance[ObjectId], col: MongoCollection[PiInstance[ObjectId]], session: ClientSession): (Seq[(Int, PiFuture)], Observable[_])
    Attributes
    protected
  42. def runThread(i: PiInstance[ObjectId])(t: (Int, PiFuture)): Unit
    Attributes
    protected
  43. def start(id: ObjectId): 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
    MongoExecutorProcessExecutor
  44. def startUpdate(i: PiInstance[ObjectId]): PiInstance[ObjectId]
    Attributes
    protected
  45. def subscribe(handler: PiEventHandler[ObjectId]): 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
  46. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  47. def toString(): String
    Definition Classes
    AnyRef → Any
  48. def unsubscribe(handlerName: String): Future[Boolean]
    Definition Classes
    SimplePiObservable
  49. final def update(id: ObjectId, f: (PiInstance[ObjectId]) ⇒ PiInstance[ObjectId], attempt: Int, promise: Promise[PiInstance[ObjectId]]): Unit
    Attributes
    protected
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  53. def [B](y: B): (MongoExecutor, B)
    Implicit
    This member is added by an implicit conversion from MongoExecutor to ArrowAssoc[MongoExecutor] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
  54. object CASException extends Exception with Product with Serializable
  55. object PiException extends Exception with Product with Serializable

Inherited from SimplePiObservable[ObjectId]

Inherited from PiPublisher[ObjectId]

Inherited from PiObservable[ObjectId]

Inherited from ProcessExecutor[ObjectId]

Inherited from AnyRef

Inherited from Any

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

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

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

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

Ungrouped