Class QueueConsumingThreadPool<T>

  • Type Parameters:
    T - the queue items identifier type.

    public class QueueConsumingThreadPool<T>
    extends java.lang.Object
    Queue consuming thread pool.
    Since:
    17.0.0
    Version:
    $Revision: 26586 $ $Date: 2024-08-26 21:06:04 -0300 (Mon, 26 Aug 2024) $
    • Method Detail

      • shutdown

        public void shutdown()
        Shuts down the thread pool.
        Since:
        17.0.0
      • submit

        public void submit​(java.lang.Runnable command)
        Submits a task to the thread pool.
        Parameters:
        command - the task.
        Since:
        17.0.0
      • submit

        public void submit​(java.lang.Runnable command,
                           T id)
        Submits a task to the thread pool. Ignores if a given task with the same identifier has already been submitted.
        Parameters:
        command - the task.
        id - the identifier of the task.
        Since:
        17.0.0