final case class PersistentExecutor(execEnv: ExecutionEnvironment, durableLog: DurableLog, kvStore: KeyValueStore, persistentState: PersistentState, operationExecutor: OperationExecutor, workflows: TMap[FlowId, Promise[Nothing, RuntimeState]], gcQueue: Queue[GarbageCollectionCommand], flowScope: Scope) extends ZFlowExecutor with Product with Serializable
- Alphabetic
- By Inheritance
- PersistentExecutor
- Serializable
- Product
- Equals
- ZFlowExecutor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new PersistentExecutor(execEnv: ExecutionEnvironment, durableLog: DurableLog, kvStore: KeyValueStore, persistentState: PersistentState, operationExecutor: OperationExecutor, workflows: TMap[FlowId, Promise[Nothing, RuntimeState]], gcQueue: Queue[GarbageCollectionCommand], flowScope: Scope)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def abort(id: FlowId): ZIO[Any, ExecutorError, Unit]
Aborts a running flow.
Aborts a running flow. If the flow has been already finished, it has no effect.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def delete(id: FlowId): IO[ExecutorError, Unit]
Delete the persisted state and result of a completed workflow
Delete the persisted state and result of a completed workflow
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- val durableLog: DurableLog
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val execEnv: ExecutionEnvironment
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val flowScope: Scope
- def forceGarbageCollection(): ZIO[Any, Nothing, Unit]
Force a GC run manually
Force a GC run manually
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- val gcQueue: Queue[GarbageCollectionCommand]
- def getAll: ZStream[Any, ExecutorError, (FlowId, FlowStatus)]
Lists all the known flows, no matter if they are still running or already finished
Lists all the known flows, no matter if they are still running or already finished
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getVariable(id: FlowId, name: RemoteVariableName): ZIO[Any, ExecutorError, Option[DynamicValue]]
Gets the latest value of a remote variable belonging to the top level of a running flow
Gets the latest value of a remote variable belonging to the top level of a running flow
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val kvStore: KeyValueStore
- 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()
- val operationExecutor: OperationExecutor
- def pause(id: FlowId): ZIO[Any, ExecutorError, Unit]
Pause a running flow.
Pause a running flow. If the flow has been already finished or is already paused, it has no effect.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- val persistentState: PersistentState
- def poll(id: FlowId): ZIO[Any, ExecutorError, Option[Either[Either[ExecutorError, DynamicValue], DynamicValue]]]
Poll currently running and complete workflows.
Poll currently running and complete workflows.
If the workflow with the provided id is completed, it will be returned.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def restartAll(): ZIO[Any, ExecutorError, Unit]
Restart all known persisted running flows after recreating an executor.
Restart all known persisted running flows after recreating an executor.
Executors with no support for persistence should do nothing.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- def resume(id: FlowId): ZIO[Any, ExecutorError, Unit]
Resumes a paused flow.
Resumes a paused flow. If the flow has been already finished or is already running, it has no effect.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- def run[E, A](id: FlowId, flow: ZFlow[Any, E, A])(implicit arg0: Schema[E], arg1: Schema[A]): IO[E, A]
Submits a flow to be executed, and waits for it to complete.
Submits a flow to be executed, and waits for it to complete.
If the executor is already running a flow with the given ID, that flow's result will be awaited.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- def setVariable(id: FlowId, name: RemoteVariableName, value: DynamicValue): ZIO[Any, ExecutorError, Unit]
Changes the value of a remote variable belonging to the top level of a flow.
Changes the value of a remote variable belonging to the top level of a flow. It is the caller's responsibility to ensure that the dynamic value has the correct type.
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- def start[E, A](id: FlowId, flow: ZFlow[Any, E, A]): ZIO[Any, ExecutorError, DurablePromise[Either[ExecutorError, DynamicValue], FlowResult]]
Submits a flow to be executed and returns a durable promise that will complete when the flow completes.
Submits a flow to be executed and returns a durable promise that will complete when the flow completes.
If the executor is already running a flow with the given ID, the existing flow's durable promise will be returned
- Definition Classes
- PersistentExecutor → ZFlowExecutor
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val workflows: TMap[FlowId, Promise[Nothing, RuntimeState]]