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

Type members

Classlikes

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

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Options

Attributes

Companion
class
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

Type parameters

A

value type

Value parameters

thunk

effectful side effect (which may throw exceptions)

Attributes

Returns

suspended ZSaga

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

Adds a compensation to the current saga

Adds a compensation to the current saga

Value parameters

compensate

the compensation which will run in case the saga fails

Attributes

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

Creates immediately failed ZSaga instance

Creates immediately failed ZSaga instance

Value parameters

error

error value

Attributes

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

Value parameters

value

scala Either value

Attributes

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

Value parameters

value

scala Try value

Attributes

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.

Type parameters

A

action result

Value parameters

compensate

the compensation which will run in case the saga fails

exec

the main action

Attributes

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

Type parameters

A

value type

Value parameters

value

result value

Attributes

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