Interface IProcessQueueManager

  • All Known Subinterfaces:
    IProcessQueueManagerSPI
    All Known Implementing Classes:
    QueueManager

    public interface IProcessQueueManager
    Manager that allows a process to be executed asynchronously as well as see what is currently queued.
    Since:
    6.1.0
    Version:
    $Revision: 24621 $ $Date: 2021-07-29 01:37:15 -0300 (Thu, 29 Jul 2021) $
    • Method Detail

      • schedule

        IQueueTaskProcess schedule​(IQueueTask task,
                                   QueueTaskScheduleConfig taskScheduleConfig)
                            throws PortalException
        Schedules the execution of the given task.

        This operation uses the current transactional context. The task will only be available for execution after the transaction is commited. If the transaction is rolled back the scheduling will also be aborted.

        Parameters:
        task - the task to be executed.
        taskScheduleConfig - contains the configuration for the execution schedule.
        Returns:
        the scheduled process for that task.
        Throws:
        PortalException - if the task could not be scheduled.
        Since:
        7.0.0
      • isActive

        boolean isActive()
        Indicates if this queue manager is active for processing queued tasks. This method may be polled by tasks to check if queue manager is no longer active, which means it is being shutdown and the task should complete its execution as soon as possible (which may mean to create another task to continue its work later in long duration task scenarios).
        Returns:
        true if this queue manager is active for processing queue items or false if it is not taking items to be processed and tasks currently executing should complete as soon as possible.
        Since:
        14.0.1
      • reprocess

        void reprocess​(String processId)
                throws PortalException
        Triggers the process to be retried.
        Parameters:
        processId - id of the process to be reprocessed.
        Throws:
        PortalException
        Since:
        6.1.0