Class QueueController<T extends DataSubmissionTask<T>>

  • Type Parameters:
    T - submission task type
    All Implemented Interfaces:
    Managed, Runnable

    public class QueueController<T extends DataSubmissionTask<T>>
    extends TimerTask
    implements Managed
    A queue controller (one per entity/port). Responsible for reporting queue-related metrics and adjusting priority across queues.
    Author:
    [email protected]
    • Field Detail

      • handlerKey

        protected final HandlerKey handlerKey
      • timer

        protected final Timer timer
      • reportRateLimiter

        protected final com.google.common.util.concurrent.RateLimiter reportRateLimiter
    • Constructor Detail

      • QueueController

        public QueueController​(HandlerKey handlerKey,
                               List<QueueProcessor<T>> processorTasks,
                               @Nullable
                               Consumer<Integer> backlogSizeSink)
        Parameters:
        handlerKey - Pipeline handler key
        processorTasks - List of QueueProcessor tasks responsible for processing the backlog.
        backlogSizeSink - Where to report backlog size.
    • Method Detail

      • start

        public void start()
        Description copied from interface: Managed
        Starts the process.
        Specified by:
        start in interface Managed
      • stop

        public void stop()
        Description copied from interface: Managed
        Stops the process.
        Specified by:
        stop in interface Managed