Interface IProcessQueueManagerSPI

  • All Superinterfaces:
    IProcessQueueManager
    All Known Implementing Classes:
    QueueManager

    public interface IProcessQueueManagerSPI
    extends IProcessQueueManager
    Manager that controls the consumption part of a queue.
    Since:
    6.1.0
    Version:
    $Revision: 24642 $ $Date: 2021-08-05 15:56:19 -0300 (Thu, 05 Aug 2021) $
    • Method Detail

      • getNextQueueTaskProcessForExecution

        IQueueTaskProcess getNextQueueTaskProcessForExecution()
                                                       throws PortalException,
                                                              java.lang.InterruptedException
        Returns the next task process for execution. This method waits until there is a task process available.

        The returned task will already have its status changed to QueueTaskProcessStatus.Running.

        Returns:
        the task process.
        Throws:
        PortalException - if there is an error obtaining the process.
        java.lang.InterruptedException - if the current thread is interrupted or if process queue became inactive.
        Since:
        7.0.0
      • removeFromQueue

        void removeFromQueue​(IQueueTaskProcess item,
                             boolean notifyListeners)
                      throws PortalException
        Removes from queue the current item.
        Parameters:
        item - to be removed from queue.
        notifyListeners - if the threads should be waken up.
        Throws:
        PortalException
        Since:
        6.1.0
      • existsTaskWithLockNotRunning

        boolean existsTaskWithLockNotRunning​(java.lang.String lockId)
        Check if exists a task with given lock identifier that is not running.
        Parameters:
        lockId - the lock identifier.
        Returns:
        true if exists a task with given lock identifier that is not running.
        Since:
        12.3.0