Class PollingTaskExecutor<R>
java.lang.Object
nl.knaw.dans.lib.util.pollingtaskexec.PollingTaskExecutor<R>
- Type Parameters:
R- the type of the task records returned by the task source
- All Implemented Interfaces:
io.dropwizard.lifecycle.Managed
A task executor that repeatedly polls a task source for new work items at a fixed interval and executes them using a provided task factory. This class is designed to manage the lifecycle of a
polling process that retrieves tasks and executes them in a controlled manner.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PollingTaskExecutor
Copy constructor. The source executor must not be running. The purpose of this constructor is only to be able to wrap a PollingTaskExecutor in a UnitOfWorkAwareProxy. In general, no copies should be created of a PollingTaskExecutor, and in particular should the schedular not be shared among PollingTaskExecutors.- Parameters:
other- the source executor
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceio.dropwizard.lifecycle.Managed
-
stop
public void stop()- Specified by:
stopin interfaceio.dropwizard.lifecycle.Managed
-
tick
@UnitOfWork public void tick()
-