ZWorker

zio.temporal.worker.ZWorker
See theZWorker companion class
object ZWorker

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZWorker.type

Members list

Type members

Classlikes

final class AddWorkflowAspectDsl[I]

Allows building workers using ZIOAspect

Allows building workers using ZIOAspect

Attributes

Supertypes
class Object
trait Matchable
class Any
final class AddWorkflowDsl[I]

Allows building workers

Allows building workers

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

type Add[+LowerR, -UpperR] = ZIOAspect[LowerR, UpperR, Nothing, Any, ZWorker, ZWorker]

Value members

Concrete methods

inline def addActivityImplementation[Activity <: AnyRef : ExtendsActivity](activity: Activity): Add[Nothing, Any]

Aspect-side entry point for addActivityImplementation.

Aspect-side entry point for addActivityImplementation.

Auto-registration: inline so the macro expansion on the inner worker.addActivityImplementation[Activity] happens at the user's concrete call site where Activity is known.

Attributes

inline def addActivityImplementationLayer[R0, Activity <: AnyRef : Tag, E0](layer: ZLayer[R0, E0, Activity]): ZIOAspect[Nothing, R0 & Scope, E0, Any, ZWorker, ZWorker]

Adds activity from the given ZLayer

Adds activity from the given ZLayer

Auto-registration: inline, same reason as addActivityImplementationService.

Value parameters

layer

the activity implementation object as a ZLayer

Attributes

inline def addActivityImplementationService[Activity <: AnyRef : Tag]: Add[Nothing, Activity]

Adds activity from the ZIO environment.

Adds activity from the ZIO environment.

Auto-registration: inline so the inner addActivityImplementation[Activity] macro sees a concrete Activity. Same opt-out semantics as the instance-side method.

Attributes

def addActivityImplementations(activityImplementationObject: ZActivityImplementationObject[_], moreObjects: ZActivityImplementationObject[_]*): Add[Nothing, Any]
def addActivityImplementations(activityImplementationObjects: List[ZActivityImplementationObject[_]]): Add[Nothing, Any]
def addActivityImplementationsLayer[R0, E0](activitiesLayer: ZLayer[R0, E0, List[ZActivityImplementationObject[_]]]): ZIOAspect[Nothing, R0 & Scope, E0, Any, ZWorker, ZWorker]

Adds activities from the given ZLayer

Adds activities from the given ZLayer

Value parameters

activitiesLayer

the list of activity implementation objects as a ZLayer

Attributes

Adds workflow to this worker

Adds workflow to this worker

Attributes

def addWorkflowImplementations(workflowImplementationClass: ZWorkflowImplementationClass[_], moreClasses: ZWorkflowImplementationClass[_]*): Add[Nothing, Any]
def addWorkflowImplementations(workflowImplementationClasses: List[ZWorkflowImplementationClass[_]]): Add[Nothing, Any]
def addWorkflowImplementations(options: ZWorkflowImplementationOptions, workflowImplementationClass: ZWorkflowImplementationClass[_], moreClasses: ZWorkflowImplementationClass[_]*): Add[Nothing, Any]

Attributes

See also
def addWorkflowImplementations(options: ZWorkflowImplementationOptions, workflowImplementationClasses: List[ZWorkflowImplementationClass[_]]): Add[Nothing, Any]

Attributes

See also

Internal builder for AddWorkflowDsl — needed because Scala 3 forbids inline methods from calling private[zio] constructors directly. Invoked by the inline ZWorker#addWorkflow[I].

Internal builder for AddWorkflowDsl — needed because Scala 3 forbids inline methods from calling private[zio] constructors directly. Invoked by the inline ZWorker#addWorkflow[I].

Attributes

def buildScopedWorkerAspect[R0, E0](thunk: ZWorker => ZIO[R0 & Scope, E0, ZWorker]): ZIOAspect[Nothing, R0 & Scope, E0, Any, ZWorker, ZWorker]

Same as buildWorkerAspect but carries an extra R0 with Scope environment type — used by the layer-based activity aspect methods.

Same as buildWorkerAspect but carries an extra R0 with Scope environment type — used by the layer-based activity aspect methods.

Attributes

def buildWorkerAspect(thunk: ZWorker => UIO[ZWorker]): Add[Nothing, Any]

Internal helper used by the inline aspect-construction methods to avoid duplicating the anonymous-class definition at every inline call site (a Scala 3 inline hygiene issue, [E197]). The thunk is called inside the aspect's flatMap and is expected to return the worker (after any side-effectful registration).

Internal helper used by the inline aspect-construction methods to avoid duplicating the anonymous-class definition at every inline call site (a Scala 3 inline hygiene issue, [E197]). The thunk is called inside the aspect's flatMap and is expected to return the worker (after any side-effectful registration).

Attributes

def buildWorkerAspectWithEnv[Activity](thunk: ZWorker => URIO[Activity, ZWorker]): Add[Nothing, Activity]

Same as buildWorkerAspect but with a custom lower-bound environment type Activity — used by addActivityImplementationService which requires Activity in the ZIO environment.

Same as buildWorkerAspect but with a custom lower-bound environment type Activity — used by addActivityImplementationService which requires Activity in the ZIO environment.

Attributes