public final class WorkflowWorker extends java.lang.Object implements SuspendableWorker, java.util.function.Consumer<io.temporal.proto.workflowservice.PollForDecisionTaskResponse>
Constructor and Description |
---|
WorkflowWorker(WorkflowServiceStubs service,
java.lang.String namespace,
java.lang.String taskList,
SingleWorkerOptions options,
DecisionTaskHandler handler,
java.lang.String stickyTaskListName) |
Modifier and Type | Method and Description |
---|---|
void |
accept(io.temporal.proto.workflowservice.PollForDecisionTaskResponse pollForDecisionTaskResponse) |
void |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isStarted() |
boolean |
isSuspended() |
boolean |
isTerminated() |
byte[] |
queryWorkflowExecution(java.lang.String jsonSerializedHistory,
java.lang.String queryType,
byte[] args) |
byte[] |
queryWorkflowExecution(WorkflowExecutionHistory history,
java.lang.String queryType,
byte[] args) |
byte[] |
queryWorkflowExecution(io.temporal.proto.execution.WorkflowExecution exec,
java.lang.String queryType,
byte[] args) |
void |
resumePolling()
Allow new poll requests.
|
void |
shutdown() |
void |
shutdownNow() |
void |
start() |
void |
suspendPolling()
Do not make new poll requests.
|
public WorkflowWorker(WorkflowServiceStubs service, java.lang.String namespace, java.lang.String taskList, SingleWorkerOptions options, DecisionTaskHandler handler, java.lang.String stickyTaskListName)
public boolean isShutdown()
isShutdown
in interface Shutdownable
public boolean isTerminated()
isTerminated
in interface Shutdownable
public byte[] queryWorkflowExecution(io.temporal.proto.execution.WorkflowExecution exec, java.lang.String queryType, byte[] args) throws java.lang.Exception
java.lang.Exception
public byte[] queryWorkflowExecution(java.lang.String jsonSerializedHistory, java.lang.String queryType, byte[] args) throws java.lang.Exception
java.lang.Exception
public byte[] queryWorkflowExecution(WorkflowExecutionHistory history, java.lang.String queryType, byte[] args) throws java.lang.Exception
java.lang.Exception
public void shutdown()
shutdown
in interface Shutdownable
public void shutdownNow()
shutdownNow
in interface Shutdownable
public void awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
awaitTermination
in interface Shutdownable
public void suspendPolling()
Suspendable
suspendPolling
in interface Suspendable
public void resumePolling()
Suspendable
resumePolling
in interface Suspendable
public boolean isSuspended()
isSuspended
in interface Suspendable
public void accept(io.temporal.proto.workflowservice.PollForDecisionTaskResponse pollForDecisionTaskResponse)
accept
in interface java.util.function.Consumer<io.temporal.proto.workflowservice.PollForDecisionTaskResponse>