Class WorkflowTaskDispatchHandle

java.lang.Object
io.temporal.worker.WorkflowTaskDispatchHandle
All Implemented Interfaces:
Closeable, AutoCloseable

public class WorkflowTaskDispatchHandle extends Object implements Closeable
  • Constructor Details

    • WorkflowTaskDispatchHandle

      public WorkflowTaskDispatchHandle(WorkflowTaskDispatchHandle.DispatchCallback dispatchCallback, TrackingSlotSupplier<WorkflowSlotInfo> slotSupplier, SlotPermit permit, @Nullable WorkerDeploymentOptions deploymentOptions)
      Parameters:
      dispatchCallback - callback into a WorkflowWorker to dispatch a workflow task.
      slotSupplier - slot supplier that was used to reserve a slot for this workflow task
      permit - the slot permit reserved for this workflow task
      deploymentOptions - 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 this WorkflowTaskDispatchHandle
    • getDeploymentOptions

      @Nullable public WorkerDeploymentOptions getDeploymentOptions()
      Returns:
      deployment options of the worker that reserved the slot, or null if not configured
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable