ZSaga

zio.temporal.workflow.ZSaga$
See theZSaga companion trait
object ZSaga

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
ZSaga.type

Members list

Concise view

Type members

Classlikes

final case class Options(parallelCompensation: Boolean, continueWithError: Boolean)

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Options

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Options.type

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def attempt[A](thunk: => A): ZSaga[A]

Suspends side effect execution within ZSaga

Suspends side effect execution within ZSaga

Attributes

A

value type

thunk

effectful side effect (which may throw exceptions)

Returns:

suspended ZSaga

def compensation(compensate: => Unit): ZSaga[Unit]

Adds a compensation to the current saga

Adds a compensation to the current saga

Attributes

compensate

the compensation which will run in case the saga fails

def fail(error: Throwable): ZSaga[Nothing]

Creates immediately failed ZSaga instance

Creates immediately failed ZSaga instance

Attributes

error

error value

Returns:

failed ZSaga

def foreach[A, B](in: Option[A])(f: A => ZSaga[B]): ZSaga[Option[B]]
def foreach[A, B, Collection <: (Iterable)](in: Collection[A])(f: A => ZSaga[B])(implicit bf: BuildFrom[Collection[A], B, Collection[B]]): ZSaga[Collection[B]]
def fromEither[A](value: Either[Throwable, A]): ZSaga[A]

Creates immediately completed ZSaga instance from scala's Either

Creates immediately completed ZSaga instance from scala's Either

Attributes

value

scala Either value

Returns:

failed ZSaga

def fromTry[A](value: Try[A]): ZSaga[A]

Creates immediately completed ZSaga instance from scala's Try

Creates immediately completed ZSaga instance from scala's Try

Attributes

value

scala Try value

Returns:

failed ZSaga

def make[A](exec: => A)(compensate: => Unit): ZSaga[A]

Creates a saga which will run a compensation if the main action fails.

Creates a saga which will run a compensation if the main action fails.

Attributes

A

action result

compensate

the compensation which will run in case the saga fails

exec

the main action

def succeed[A](value: A): ZSaga[A]

Creates immediately completed ZSaga instance which won't fail

Creates immediately completed ZSaga instance which won't fail

Attributes

A

value type

value

result value

Returns:

value wrapped into ZSaga

Concrete fields

val unit: ZSaga[Unit]

Creates a completed ZSaga with Unit result.

Creates a completed ZSaga with Unit result.

Attributes