public final class ShadowingWorker extends java.lang.Object implements Suspendable
Constructor and Description |
---|
ShadowingWorker(WorkflowClient client,
java.lang.String taskList,
WorkerOptions options,
ShadowingOptions shadowingOptions)
ShadowingWorker starts a shadowing workflow to replay the target workflows.
|
ShadowingWorker(WorkflowClient client,
java.lang.String taskList,
WorkerOptions options,
ShadowingOptions shadowingOptions,
TestEnvironmentOptions testOptions)
ShadowingWorker starts a shadowing workflow to replay the target workflows.
|
Modifier and Type | Method and Description |
---|---|
<R> void |
addWorkflowImplementationFactory(java.lang.Class<R> workflowInterface,
Functions.Func<R> factory) |
<R> void |
addWorkflowImplementationFactory(WorkflowImplementationOptions options,
java.lang.Class<R> workflowInterface,
Functions.Func<R> factory) |
void |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isSuspended() |
boolean |
isTerminated() |
void |
registerWorkflowImplementationTypes(java.lang.Class<?>... workflowImplementationClasses) |
void |
registerWorkflowImplementationTypes(WorkflowImplementationOptions options,
java.lang.Class<?>... workflowImplementationClasses) |
void |
resumePolling()
Allow new poll requests.
|
void |
shutdown() |
void |
shutdownNow() |
void |
start() |
protected void |
startShadowingWorkflow() |
void |
suspendPolling()
Do not make new poll requests.
|
public ShadowingWorker(WorkflowClient client, java.lang.String taskList, WorkerOptions options, ShadowingOptions shadowingOptions)
client
- is the target endpoint to fetch workflow history.taskList
- is the task list used in the workflows.options
- is worker option.shadowingOptions
- is the shadowing options.public ShadowingWorker(WorkflowClient client, java.lang.String taskList, WorkerOptions options, ShadowingOptions shadowingOptions, TestEnvironmentOptions testOptions)
client
- is the target endpoint to fetch workflow history.taskList
- is the task list used in the workflows.options
- is worker option.shadowingOptions
- is the shadowing options.testOptions
- uses to set customized data converter, interceptor and context propagator.public void start() throws java.lang.Exception
java.lang.Exception
public void shutdown()
public void shutdownNow()
public boolean isTerminated()
public void awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
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 registerWorkflowImplementationTypes(java.lang.Class<?>... workflowImplementationClasses)
public void registerWorkflowImplementationTypes(WorkflowImplementationOptions options, java.lang.Class<?>... workflowImplementationClasses)
public <R> void addWorkflowImplementationFactory(WorkflowImplementationOptions options, java.lang.Class<R> workflowInterface, Functions.Func<R> factory)
public <R> void addWorkflowImplementationFactory(java.lang.Class<R> workflowInterface, Functions.Func<R> factory)
protected void startShadowingWorkflow() throws java.lang.Exception
java.lang.Exception