Package com.uber.cadence.internal.sync
Class SyncActivityWorker
- java.lang.Object
-
- com.uber.cadence.internal.sync.SyncActivityWorker
-
- All Implemented Interfaces:
Lifecycle
,Shutdownable
,Startable
,Suspendable
,SuspendableWorker
public class SyncActivityWorker extends java.lang.Object implements SuspendableWorker
Activity worker that supports POJO activity implementations.
-
-
Constructor Summary
Constructors Constructor Description SyncActivityWorker(IWorkflowService service, java.lang.String domain, java.lang.String taskList, SingleWorkerOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
boolean
isShutdown()
boolean
isStarted()
boolean
isSuspended()
boolean
isTerminated()
void
resumePolling()
Allow new poll requests.void
setActivitiesImplementation(java.lang.Object... activitiesImplementation)
void
shutdown()
void
shutdownNow()
void
start()
void
suspendPolling()
Do not make new poll requests.
-
-
-
Constructor Detail
-
SyncActivityWorker
public SyncActivityWorker(IWorkflowService service, java.lang.String domain, java.lang.String taskList, SingleWorkerOptions options)
-
-
Method Detail
-
setActivitiesImplementation
public void setActivitiesImplementation(java.lang.Object... activitiesImplementation)
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfaceShutdownable
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceShutdownable
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceShutdownable
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interfaceShutdownable
-
awaitTermination
public void awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
- Specified by:
awaitTermination
in interfaceShutdownable
-
suspendPolling
public void suspendPolling()
Description copied from interface:Suspendable
Do not make new poll requests. Outstanding long polls still can return tasks after this method was called.- Specified by:
suspendPolling
in interfaceSuspendable
-
resumePolling
public void resumePolling()
Description copied from interface:Suspendable
Allow new poll requests.- Specified by:
resumePolling
in interfaceSuspendable
-
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended
in interfaceSuspendable
-
-