ZWorkerFactory

zio.temporal.worker.ZWorkerFactory
See theZWorkerFactory companion object
final class ZWorkerFactory

Maintains worker creation and lifecycle.

Attributes

See also:

WorkerFactory

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def newWorker(taskQueue: String, options: ZWorkerOptions): UIO[ZWorker]

Creates worker that connects to an instance of the Temporal Service. It uses the namespace configured at the Factory level. New workers cannot be created after the start() has been called

Creates worker that connects to an instance of the Temporal Service. It uses the namespace configured at the Factory level. New workers cannot be created after the start() has been called

Attributes

options

Options for configuring worker.

taskQueue

task queue name worker uses to poll. It uses this name for both workflow and activity task queue polls.

Returns:

ZWorker

See also:

WorkerFactory#newWorker

def setup: URIO[Scope, Unit]

Allows to setup ZWorkerFactory with guaranteed finalization.

Allows to setup ZWorkerFactory with guaranteed finalization.

Attributes

def shutdown: UIO[Unit]

Initiates an orderly shutdown in which polls are stopped and already received workflow and activity tasks are executed.

Initiates an orderly shutdown in which polls are stopped and already received workflow and activity tasks are executed.

Attributes

See also:

WorkerFactory#shutdown

def shutdownNow: UIO[Unit]

Initiates an orderly shutdown in which polls are stopped and already received workflow and activity tasks are attempted to be stopped. This implementation cancels tasks via Thread.interrupt(), so any task that fails to respond to interrupts may never terminate.

Initiates an orderly shutdown in which polls are stopped and already received workflow and activity tasks are attempted to be stopped. This implementation cancels tasks via Thread.interrupt(), so any task that fails to respond to interrupts may never terminate.

Attributes

See also:

WorkerFactory#shutdownNow

def start: UIO[Unit]

Starts all the workers created by this factory.

Starts all the workers created by this factory.

Attributes

Deprecated methods

def use[R, E, A](thunk: ZIO[R, E, A]): ZIO[R, E, A]

Allows to run arbitrary effect ensuring a shutdown on effect completion.

Allows to run arbitrary effect ensuring a shutdown on effect completion.

Shutdown will be initiated when effect either completes successfully or fails (with error or defect) The effect will return after shutdown completed

Attributes

thunk

the effect to run

Deprecated
[Since version 0.2.0]

Concrete fields

val toJava: WorkerFactory