sealed trait ZAsync[+A] extends AnyRef

Contains result of an asynchronous computation. Similar to zio.IO with the following differences:

  1. Can be used only inside a Temporal workflow code. Use zio.ZIO and its derivatives to implement activities and workflow starting and querying code. run method doesn't throw InterruptedException. The only way to unblock run is to complete the ZAsync

2. ZAsync doesn't directly supports cancellation. Use io.temporal.workflow.CancellationScope to cancel and handle cancellations. The pattern is that a canceled operation completes its ZAsync with io.temporal.failure.CanceledFailure when canceled.

3. Unlike zio.IO (that is lazy), ZAsync is strict. Whenever a ZAsync is created, The thunk is immediately started

Self Type
ZAsync[A]
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZAsync
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def catchAll[A0 >: A](f: (Throwable) => ZAsync[A0]): ZAsync[A0]
  2. abstract def catchSome[A0 >: A](pf: PartialFunction[Throwable, ZAsync[A0]]): ZAsync[A0]
  3. abstract def flatMap[B](f: (A) => ZAsync[B]): ZAsync[B]
  4. abstract def map[B](f: (A) => B): ZAsync[B]
  5. abstract def run(timeout: zio.Duration): Result[Timeout, A]
  6. abstract def run: Result[NoEffects, A]

    Blocks until the promise completes

    Blocks until the promise completes

    returns

    either result or error

  7. abstract def runCancellable(timeout: zio.Duration): Result[Cancel with Timeout, A]
  8. abstract def runCancellable: Result[Cancel, A]
  9. abstract val underlying: io.temporal.workflow.Promise[A]
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def as[B](value: => B): ZAsync[B]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. final def ignore: ZAsync[Unit]

    Ignore any errors

  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def option: ZAsync[Option[A]]

    Return None if error occurred

  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. final def tap(f: (A) => Unit): ZAsync[A]
  19. final def tapError(f: (Throwable) => Unit): ZAsync[A]
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. def unit: ZAsync[Unit]
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def zipPar[B, C](that: ZAsync[B])(f: (A, B) => C): ZAsync[C]

    The only difference with zipWith is that that is by-value.

    The only difference with zipWith is that that is by-value. Therefore, left ZAsync is already started

  26. final def zipWith[B, C](that: => ZAsync[B])(f: (A, B) => C): ZAsync[C]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped