Class DelayedTaskConsumer<E extends TaskIfc>

java.lang.Object
com.nt.udc.testnodechain.timeout.queue.DelayedTaskConsumer<E>
All Implemented Interfaces:
Runnable

public class DelayedTaskConsumer<E extends TaskIfc> extends Object implements Runnable
The DelayedTaskConsumer class represents a consumer for delayed tasks that operates on elements of type E, where E extends the TaskIfc interface.
  • Constructor Details

  • Method Details

    • stopConsumer

      public void stopConsumer()
    • setCallback

      public void setCallback(ConsumerCallbackIfc<E> callback)
    • 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.
      Specified by:
      run in interface Runnable