public class SyncWorkflowWorker extends java.lang.Object implements SuspendableWorker, java.util.function.Consumer<PollForDecisionTaskResponse>
Constructor and Description |
---|
SyncWorkflowWorker(IWorkflowService service,
java.lang.String domain,
java.lang.String taskList,
java.util.function.Function<WorkflowInterceptor,WorkflowInterceptor> interceptorFactory,
SingleWorkerOptions workflowOptions,
SingleWorkerOptions localActivityOptions,
DeciderCache cache,
java.lang.String stickyTaskListName,
java.time.Duration stickyDecisionScheduleToStartTimeout,
java.util.concurrent.ThreadPoolExecutor workflowThreadPool) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PollForDecisionTaskResponse pollForDecisionTaskResponse) |
<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 |
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(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 |
setWorkflowImplementationTypes(WorkflowImplementationOptions options,
java.lang.Class<?>[] workflowImplementationTypes) |
void |
shutdown() |
void |
shutdownNow() |
void |
start() |
void |
suspendPolling()
Do not make new poll requests.
|
public SyncWorkflowWorker(IWorkflowService service, java.lang.String domain, java.lang.String taskList, java.util.function.Function<WorkflowInterceptor,WorkflowInterceptor> interceptorFactory, SingleWorkerOptions workflowOptions, SingleWorkerOptions localActivityOptions, DeciderCache cache, java.lang.String stickyTaskListName, java.time.Duration stickyDecisionScheduleToStartTimeout, java.util.concurrent.ThreadPoolExecutor workflowThreadPool)
public void setWorkflowImplementationTypes(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(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 accept(PollForDecisionTaskResponse pollForDecisionTaskResponse)
accept
in interface java.util.function.Consumer<PollForDecisionTaskResponse>