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

Value members

Concrete methods

def getWorker(taskQueue: String): UIO[Option[ZWorker]]

Value parameters

taskQueue

task queue name to lookup an existing worker for

Attributes

Returns

a worker created previously through newWorker for the given task queue.

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

Value parameters

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.

Attributes

Returns

ZWorker

See also

WorkerFactory#newWorker

def serve: URIO[Scope, Nothing]

Allows to setup ZWorkerFactory with guaranteed finalization. To be used in worker-only applications

Allows to setup ZWorkerFactory with guaranteed finalization. To be used in worker-only applications

Attributes

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

Concrete fields

val toJava: WorkerFactory