Class DelayedTaskConsumer<E extends TaskIfc>
java.lang.Object
com.nt.udc.testnodechain.timeout.queue.DelayedTaskConsumer<E>
- All Implemented Interfaces:
Runnable
The DelayedTaskConsumer class represents a consumer for delayed tasks that operates on elements
of type E, where E extends the TaskIfc interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
run()
Executes the main logic of the DelayedTaskConsumer in a separate thread.void
setCallback
(ConsumerCallbackIfc<E> callback) void
-
Constructor Details
-
DelayedTaskConsumer
-
-
Method Details
-
stopConsumer
public void stopConsumer() -
setCallback
-
run
public void run()Executes the main logic of the DelayedTaskConsumer in a separate thread. Continuously consumes tasks from the queue and invokes the callback's onConsume method. The consumer stops when the thread is interrupted or explicitly stopped.
-