Class WorkerCommandTaskHandler
java.lang.Object
io.temporal.internal.worker.WorkerCommandTaskHandler
- All Implemented Interfaces:
NexusTaskHandler
Handles server-to-worker commands delivered on the worker command Nexus task queue.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.temporal.internal.worker.NexusTaskHandler
NexusTaskHandler.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SuspendableWorkernewWorkerCommandWorker(io.temporal.serviceclient.WorkflowServiceStubs service, String namespace, String identity, String workerGroupingKey, Function<byte[], Boolean> activityCancelCallback, com.uber.m3.tally.Scope metricsScope, NamespaceCapabilities namespaceCapabilities) booleanstart()Start the handler if the handler has any registered services.static StringworkerControlTaskQueue(String namespace, String workerGroupingKey)
-
Constructor Details
-
WorkerCommandTaskHandler
-
-
Method Details
-
workerControlTaskQueue
-
newWorkerCommandWorker
public static SuspendableWorker newWorkerCommandWorker(@Nonnull io.temporal.serviceclient.WorkflowServiceStubs service, @Nonnull String namespace, @Nonnull String identity, @Nonnull String workerGroupingKey, @Nonnull Function<byte[], Boolean> activityCancelCallback, @Nonnull com.uber.m3.tally.Scope metricsScope, @Nonnull NamespaceCapabilities namespaceCapabilities) -
start
public boolean start()Description copied from interface:NexusTaskHandlerStart the handler if the handler has any registered services. It is an error to start a handler more than once.- Specified by:
startin interfaceNexusTaskHandler- Returns:
- True if this handler can handle at least one nexus service.
-
handle
public NexusTaskHandler.Result handle(NexusTask task, com.uber.m3.tally.Scope metricsScope) throws TimeoutException - Specified by:
handlein interfaceNexusTaskHandler- Throws:
TimeoutException
-