Package lumis.portal.processqueue
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: 24622 $ $Date: 2021-07-29 01:47:56 -0300 (Thu, 29 Jul 2021) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IQueueStatistics
getQueueStatistics()
Retrieves the current situation statistics of the queue.IQueueTaskProcess
getTaskProcess(java.lang.String processId)
Retrieves the queue item of represented by the processId.java.util.Collection<IQueueTaskProcess>
getTaskProcessByOwnerId(java.lang.String ownerId)
Returns the processes of a given owner.boolean
isActive()
Indicates if this queue manager is active for processing queued tasks.void
reprocess(java.lang.String processId)
Triggers the process to be retried.IQueueTaskProcess
schedule(IQueueTask task, QueueTaskScheduleConfig taskScheduleConfig)
Schedules the execution of the given task.
-
-
-
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
-
getTaskProcess
IQueueTaskProcess getTaskProcess(java.lang.String processId) throws PortalException
Retrieves the queue item of represented by the processId.- Parameters:
processId
-- Returns:
- the queue item
- Throws:
PortalException
- Since:
- 6.1.0
-
getTaskProcessByOwnerId
java.util.Collection<IQueueTaskProcess> getTaskProcessByOwnerId(java.lang.String ownerId) throws PortalException
Returns the processes of a given owner.- Parameters:
ownerId
- the owner identifier.- Returns:
- a collection with the processes.
- Throws:
PortalException
- 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 orfalse
if it is not taking items to be processed and tasks currently executing should complete as soon as possible.- Since:
- 14.0.1
-
getQueueStatistics
IQueueStatistics getQueueStatistics() throws PortalException
Retrieves the current situation statistics of the queue.- Returns:
- statistics.
- Throws:
PortalException
- Since:
- 6.1.0
-
reprocess
void reprocess(java.lang.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
-
-