sealed trait ZFlow[-R, +E, +A] extends AnyRef
ZFlow is a serializable executable workflow.
Values (including functions) used in ZFlows must be Remote values which guarantees that they can be persisted.
- R
The type of the input that can be provided for the workflow
- E
The type this workflow can fail with
- A
The result type this workflow returns with in case it succeeds
- Self Type
- ZFlow[R, E, A]
- Alphabetic
- By Inheritance
- ZFlow
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
substituteRec[B](f: Substitutions): ZFlow[R, E, A]
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
*>[R1 <: R, E1 >: E, A1 >: A, B](that: ZFlow[R1, E1, B]): ZFlow[R1, E1, B]
Executes this flow and then that flow, keeping only the result of the second.
Executes this flow and then that flow, keeping only the result of the second.
An alias for zipRight.
-
final
def
<*[R1 <: R, E1 >: E, A1 >: A, B](that: ZFlow[R1, E1, B]): ZFlow[R1, E1, A1]
Executes this flow and then that flow, keeping only the result of the first.
Executes this flow and then that flow, keeping only the result of the first.
An alias for zipLeft
-
final
def
<*>[R1 <: R, E1 >: E, A1 >: A, B](that: ZFlow[R1, E1, B]): ZFlow[R1, E1, (A1, B)]
Executes this flow and then that flow keeping the result of both zipped together
Executes this flow and then that flow keeping the result of both zipped together
An alias for zip
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
as[B](b: ⇒ Remote[B]): ZFlow[R, E, B]
Replace the flow's result value with the provided value
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
catchAll[R1 <: R, E1 >: E, A1 >: A, E2](f: (Remote[E1]) ⇒ ZFlow[R1, E2, A1]): ZFlow[R1, E2, A1]
Recover from any failure of this flow by executing the given function
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
ensuring[E1 >: E, A1 >: A](flow: ZFlow[Any, ZNothing, Any]): ZFlow[R, E1, A1]
Ensure that the given flow is executed after this flow, regardless of success or failure
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flatMap[R1 <: R, E1 >: E, B](f: (Remote[A]) ⇒ ZFlow[R1, E1, B]): ZFlow[R1, E1, B]
Executes this flow and then calls the given function with the flow's result to determine the next steps.
-
final
def
foldFlow[R1 <: R, E2, B](onError: (Remote[E]) ⇒ ZFlow[R1, E2, B], onSuccess: (Remote[A]) ⇒ ZFlow[R1, E2, B]): ZFlow[R1, E2, B]
Executes this flow and then calls either the onError or the onSuccess functions to determine the next steps.
-
final
def
fork: ZFlow[R, ZNothing, ExecutingFlow[E, A]]
Execute this flow in the background.
Execute this flow in the background.
The returned value (of type ExecutingFlow) can be used to await or interrupt the running flow.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
ifThenElse[R1 <: R, E1 >: E, B](ifTrue: ZFlow[R1, E1, B], ifFalse: ZFlow[R1, E1, B])(implicit ev: <:<[A, Boolean]): ZFlow[R1, E1, B]
Executes this flow and based on its boolean result determines the next steps by either calling ifTrue or ifFalse
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
iterate[R1 <: R, E1 >: E, A1 >: A](step: (Remote[A1]) ⇒ ZFlow[R1, E1, A1])(predicate: (Remote[A1]) ⇒ Remote[Boolean]): ZFlow[R1, E1, A1]
Repeatedly executes a flow until a given predicate becomes true.
Repeatedly executes a flow until a given predicate becomes true.
The initial value is the result of this flow. The step function is called with this value to produce the next flow to execute. The iteration stops when the predicate function returns true for the last step's result.
-
final
def
map[B](f: (Remote[A]) ⇒ Remote[B]): ZFlow[R, E, B]
Maps the result of this flow with the given function
-
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()
-
final
def
orDie[R1 <: R, E1 >: E, A1 >: A]: ZFlow[R1, ZNothing, A1]
Converts this flow's failure to a fatal flow failure
-
final
def
orElse[R1 <: R, E1 >: E, E2, A1 >: A](that: ZFlow[R1, E2, A1]): ZFlow[R1, E2, A1]
Executes this flow and if it fails executes that flow.
Executes this flow and if it fails executes that flow.
The flow and the fallback flow must have compatible result types. If they don't, use orElseEither.
-
final
def
orElseEither[R1 <: R, A1 >: A, E2, B](that: ZFlow[R1, E2, B]): ZFlow[R1, E2, Either[A1, B]]
Executes this flow and if it fails executes that flow.
Executes this flow and if it fails executes that flow. The two flows can have different result types which will be captured in an Either value.
-
final
def
orTry[R1 <: R, E1 >: E, A1 >: A](that: ZFlow[R1, E1, A1]): ZFlow[R1, E1, A1]
Attempts to execute this flow, but then, if this flow is suspended due to performing a retry operation inside a transaction (because conditions necessary for executing this flow are not yet ready), then will switch over to the specified flow.
Attempts to execute this flow, but then, if this flow is suspended due to performing a retry operation inside a transaction (because conditions necessary for executing this flow are not yet ready), then will switch over to the specified flow.
If this flow never suspends, then it will always execute to success or failure, and the specified flow will never be executed.
-
final
def
provide(value: Remote[R]): ZFlow[Any, E, A]
Provide a value as this flow's input
-
final
def
repeat[Ctx](schedule: ZFlowSchedule[Ctx]): ZFlow[R, E, List[A]]
Runs this workflow and then repeats it according to the given schedule.
Runs this workflow and then repeats it according to the given schedule. The result is the list of all the results collected from the repeated flow.
-
final
def
replicate(n: Remote[Int]): ZFlow[R, E, Chunk[A]]
Repeats this flow n times and collect all the results
-
def
schedule[Ctx](schedule: ZFlowSchedule[Ctx]): ZFlow[R, E, Option[A]]
Delays the execution of this flow according to the given schedule.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
timeout(duration: Remote[zio.Duration]): ZFlow[R, E, Option[A]]
Try to execute this flow but timeout after the given duration.
Try to execute this flow but timeout after the given duration.
If the flow finished running within the time limits, the result is wrapped in Some, otherwise if it timed out the result is None.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
unit: ZFlow[R, E, Unit]
Ignores the successful result of this flow and return with unit instead
-
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()
-
final
def
widen[A0](implicit ev: <:<[A, A0]): ZFlow[R, E, A0]
Widen the result type of the flow
-
final
def
zip[R1 <: R, E1 >: E, A1 >: A, B](that: ZFlow[R1, E1, B]): ZFlow[R1, E1, (A1, B)]
Executes this flow and then that flow keeping the result of both zipped together
Executes this flow and then that flow keeping the result of both zipped together
Has a symbolic alias <*>
-
final
def
zipLeft[R1 <: R, E1 >: E, A1 >: A, B](that: ZFlow[R1, E1, B]): ZFlow[R1, E1, A1]
Executes this flow and then that flow, keeping only the result of the first.
Executes this flow and then that flow, keeping only the result of the first.
Has a symbolic alias <*
-
final
def
zipRight[R1 <: R, E1 >: E, A1 >: A, B](that: ZFlow[R1, E1, B]): ZFlow[R1, E1, B]
Executes this flow and then that flow, keeping only the result of the second.
Executes this flow and then that flow, keeping only the result of the second.
Has a symbolic alias *>.