Class WorkflowTaskDispatchHandle
java.lang.Object
io.temporal.worker.WorkflowTaskDispatchHandle
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA callback into aWorkflowWorkerto dispatch a workflow task -
Constructor Summary
ConstructorsConstructorDescriptionWorkflowTaskDispatchHandle(WorkflowTaskDispatchHandle.DispatchCallback dispatchCallback, TrackingSlotSupplier<WorkflowSlotInfo> slotSupplier, SlotPermit permit, WorkerDeploymentOptions deploymentOptions) -
Method Summary
-
Constructor Details
-
WorkflowTaskDispatchHandle
public WorkflowTaskDispatchHandle(WorkflowTaskDispatchHandle.DispatchCallback dispatchCallback, TrackingSlotSupplier<WorkflowSlotInfo> slotSupplier, SlotPermit permit, @Nullable WorkerDeploymentOptions deploymentOptions) - Parameters:
dispatchCallback- callback into aWorkflowWorkerto dispatch a workflow task.slotSupplier- slot supplier that was used to reserve a slot for this workflow taskpermit- the slot permit reserved for this workflow taskdeploymentOptions- deployment options of the worker that reserved the slot, or null if not configured
-
-
Method Details
-
dispatch
public boolean dispatch(@Nonnull io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse workflowTask) - Parameters:
workflowTask- to be fed directly into the workflow worker- Returns:
- true is the workflow task was successfully dispatched
- Throws:
IllegalArgumentException- if the workflow task doesn't belong to the task queue of the worker provided thisWorkflowTaskDispatchHandle
-
getDeploymentOptions
- Returns:
- deployment options of the worker that reserved the slot, or null if not configured
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-