public class SyncWorkflowWorker extends java.lang.Object implements SuspendableWorker, Functions.Proc1<io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse>
Constructor and Description |
---|
SyncWorkflowWorker(WorkflowServiceStubs service,
java.lang.String namespace,
java.lang.String taskQueue,
WorkflowInterceptor[] workflowInterceptors,
ActivityInterceptor[] activityInterceptors,
SingleWorkerOptions workflowOptions,
SingleWorkerOptions localActivityOptions,
WorkflowExecutorCache cache,
java.lang.String stickyTaskQueueName,
java.time.Duration stickyWorkflowTaskScheduleToStartTimeout,
java.util.concurrent.ThreadPoolExecutor workflowThreadPool) |
Modifier and Type | Method and Description |
---|---|
<R> void |
addWorkflowImplementationFactory(java.lang.Class<R> clazz,
Functions.Func<R> factory) |
<R> void |
addWorkflowImplementationFactory(WorkflowImplementationOptions options,
java.lang.Class<R> clazz,
Functions.Func<R> factory) |
void |
addWorkflowImplementationTypes(WorkflowImplementationOptions options,
java.lang.Class<?>[] workflowImplementationTypes) |
void |
apply(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse pollWorkflowTaskQueueResponse) |
void |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isStarted() |
boolean |
isSuspended() |
boolean |
isTerminated() |
<R> R |
queryWorkflowExecution(WorkflowExecutionHistory history,
java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
java.lang.Object[] args) |
<R> R |
queryWorkflowExecution(io.temporal.api.common.v1.WorkflowExecution execution,
java.lang.String queryType,
java.lang.Class<R> resultClass,
java.lang.reflect.Type resultType,
java.lang.Object[] args) |
void |
resumePolling()
Allow new poll requests.
|
void |
setLocalActivitiesImplementation(java.lang.Object... activitiesImplementation) |
void |
shutdown() |
void |
shutdownNow() |
void |
start() |
void |
suspendPolling()
Do not make new poll requests.
|
public SyncWorkflowWorker(WorkflowServiceStubs service, java.lang.String namespace, java.lang.String taskQueue, WorkflowInterceptor[] workflowInterceptors, ActivityInterceptor[] activityInterceptors, SingleWorkerOptions workflowOptions, SingleWorkerOptions localActivityOptions, WorkflowExecutorCache cache, java.lang.String stickyTaskQueueName, java.time.Duration stickyWorkflowTaskScheduleToStartTimeout, java.util.concurrent.ThreadPoolExecutor workflowThreadPool)
public void addWorkflowImplementationTypes(WorkflowImplementationOptions options, java.lang.Class<?>[] workflowImplementationTypes)
public <R> void addWorkflowImplementationFactory(WorkflowImplementationOptions options, java.lang.Class<R> clazz, Functions.Func<R> factory)
public <R> void addWorkflowImplementationFactory(java.lang.Class<R> clazz, Functions.Func<R> factory)
public void setLocalActivitiesImplementation(java.lang.Object... activitiesImplementation)
public boolean isShutdown()
isShutdown
in interface Shutdownable
public boolean isTerminated()
isTerminated
in interface Shutdownable
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 <R> R queryWorkflowExecution(io.temporal.api.common.v1.WorkflowExecution execution, java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exception
public <R> R queryWorkflowExecution(WorkflowExecutionHistory history, java.lang.String queryType, java.lang.Class<R> resultClass, java.lang.reflect.Type resultType, java.lang.Object[] args) throws java.lang.Exception
java.lang.Exception
public void apply(io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse pollWorkflowTaskQueueResponse)
apply
in interface Functions.Proc1<io.temporal.api.workflowservice.v1.PollWorkflowTaskQueueResponse>