object ZAsync
- Alphabetic
- By Inheritance
- ZAsync
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait Cancel extends NoEffects
- case class Cancelled(failure: CanceledFailure) extends Result[Cancel, Nothing] with Product with Serializable
- case class Failure(error: Throwable) extends Result[NoEffects, Nothing] with Product with Serializable
- sealed trait NoEffects extends AnyRef
- sealed trait Result[-C <: NoEffects, +A] extends AnyRef
Represents ZAsync execution result
- case class Success[A](value: A) extends Result[NoEffects, A] with Product with Serializable
- case class TimedOut(failure: TimeoutException) extends Result[Timeout, Nothing] with Product with Serializable
- sealed trait Timeout extends NoEffects
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def attempt[A](thunk: => A): ZAsync[A]
Suspends side effect execution within ZAsync
Suspends side effect execution within ZAsync
- A
value type
- thunk
effectful side effect (which may throw exceptions)
- returns
suspended promise
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def collectAll[A, Collection[+Element] <: Iterable[Element]](in: Collection[ZAsync[A]])(implicit bf: zio.BuildFrom[Collection[ZAsync[A]], A, Collection[A]]): ZAsync[Collection[A]]
Similar to zio.ZIO.collectAll for collections
Similar to zio.ZIO.collectAll for collections
- in
sequence of ZAsync
- returns
promise with collected results or failure
- def collectAllDiscard(in: Iterable[ZAsync[Any]]): ZAsync[Unit]
Returns ZAsync that becomes completed when all promises in the collection are completed.
Returns ZAsync that becomes completed when all promises in the collection are completed. A single promise failure causes resulting promise to deliver the failure immediately.
- in
async computations to wait for.
- returns
ZAsync that is completed with null when all the argument promises become completed.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail(error: Throwable): ZAsync[Nothing]
Creates failed ZAsync
Creates failed ZAsync
- error
the error
- returns
promise completed with error
- def foreach[A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) => ZAsync[B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]]): ZAsync[Collection[B]]
Similar to zio.ZIO.foreach for collections
Similar to zio.ZIO.foreach for collections
- in
sequence of values
- f
value handler
- returns
promise with collected results or failure
- def foreach[A, B](in: Option[A])(f: (A) => ZAsync[B]): ZAsync[Option[B]]
Similar to zio.ZIO.foreach for Option
Similar to zio.ZIO.foreach for Option
- in
optional value
- f
value handler
- returns
promise with collected result, None or failure
- def foreachDiscard[A](in: Iterable[A])(f: (A) => ZAsync[Any]): ZAsync[Unit]
Similar to zio.ZIO.foreachDiscard for collections
Similar to zio.ZIO.foreachDiscard for collections
- in
sequence of values
- f
value handler
- returns
promise that completes when all inner promises complete
- def foreachPar[A, B, Collection[+Element] <: Iterable[Element]](in: Collection[A])(f: (A) => ZAsync[B])(implicit bf: zio.BuildFrom[Collection[A], B, Collection[B]]): ZAsync[Collection[B]]
Similar to zio.ZIO.foreachPar for collections
Similar to zio.ZIO.foreachPar for collections
- in
sequence of values
- f
value handler
- returns
promise with collected results or failure
- def foreachParDiscard[A](in: Iterable[A])(f: (A) => ZAsync[Any]): ZAsync[Unit]
Similar to zio.ZIO.foreachParDiscard for collections
Similar to zio.ZIO.foreachParDiscard for collections
- in
sequence of values
- f
value handler
- returns
promise which succeeds if all ZAsync succeed
- def fromEither[A](thunk: => Either[Throwable, A]): ZAsync[A]
Suspends side effect execution within ZAsync
Suspends side effect execution within ZAsync
- A
value type
- thunk
side effect
- returns
suspended promise
- def fromJava[A](promise: io.temporal.workflow.Promise[A]): ZAsync[A]
Wraps Temporal's Promise into ZAsync
Wraps Temporal's Promise into ZAsync
- A
value type
- promise
the promise
- returns
promise wrapped
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def raceFirst[A](in: Iterable[ZAsync[A]]): ZAsync[A]
Returns ZAsync that becomes completed when any of the arguments is completed.
Returns ZAsync that becomes completed when any of the arguments is completed. If it completes exceptionally then result is also completes exceptionally.
- def succeed[A](value: A): ZAsync[A]
Creates successfully completed ZAsync
Creates successfully completed ZAsync
- A
value type
- value
the value
- returns
promise completed with value
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unit: ZAsync[Unit]
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object Result
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)