Class DefaultDelayingQueue<T>

java.lang.Object
io.micronaut.kubernetes.client.openapi.operator.workqueue.DefaultWorkQueue<T>
io.micronaut.kubernetes.client.openapi.operator.workqueue.DefaultDelayingQueue<T>
Type Parameters:
T - item type
All Implemented Interfaces:
DelayingQueue<T>, WorkQueue<T>
Direct Known Subclasses:
DefaultRateLimitingQueue

public class DefaultDelayingQueue<T> extends DefaultWorkQueue<T> implements DelayingQueue<T>
The default delaying queue implementation.

The code has been copied from the official client and modified: DefaultDelayingQueue

  • Constructor Details

    • DefaultDelayingQueue

      public DefaultDelayingQueue(ExecutorService waitingWorker)
  • Method Details

    • start

      public void start()
      Description copied from interface: WorkQueue
      Starts the work queue. Can be called after shutdown to enable queue usage.
      Specified by:
      start in interface WorkQueue<T>
      Overrides:
      start in class DefaultWorkQueue<T>
    • shutdown

      public void shutdown()
      Description copied from interface: WorkQueue
      Initiates a shutdown of the work queue. All added items whose processing not started will be ignored and removed from the queue.
      Specified by:
      shutdown in interface WorkQueue<T>
      Overrides:
      shutdown in class DefaultWorkQueue<T>
    • addAfter

      public void addAfter(T item, Duration duration)
      Adds given item to the queue after given duration expires.
      Specified by:
      addAfter in interface DelayingQueue<T>
      Parameters:
      item - item to add
      duration - specific duration