lumis.portal.processqueue
Interface IProcessQueueManagerSPI

Package class diagram package 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

Method Summary
 IQueueTaskProcess getNextQueuedItem()
          Retrieves the next QueueItem that is queued state or is in scheduled but the scheduled time has already passed and sets its status to InProgress.
 IQueueTaskProcess getNextScheduledProcess()
          Returns the next scheduled IQueueItem.
 void removeFromQueue(IQueueTaskProcess item, boolean notifyListeners)
          Removes from queue the current item.
 void setFailedStatus(IQueueTaskProcess queueItem)
          Sets the given process the status of QueueTaskProcessStatus.Failed.
 void waitForQueueReadyToProcess(long timeout)
          Informs the thread that is is supposed to wait for a process to enter queue or wait timeout before waking up.
 
Methods inherited from interface lumis.portal.processqueue.IProcessQueueManager
getQueueStatistics, getTaskProcess, reprocess, schedule, schedule, send, send, send, send
 

Method Detail

getNextQueuedItem

IQueueTaskProcess getNextQueuedItem()
                                    throws PortalException
Retrieves the next QueueItem that is queued state or is in scheduled but the scheduled time has already passed and sets its status to InProgress.

Returns:
queued item.
Throws:
PortalException
Since:
6.1.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

setFailedStatus

void setFailedStatus(IQueueTaskProcess queueItem)
                     throws PortalException
Sets the given process the status of QueueTaskProcessStatus.Failed.

Parameters:
queueItem - item to be put in failed status.
Throws:
PortalException
Since:
6.1.0

getNextScheduledProcess

IQueueTaskProcess getNextScheduledProcess()
                                          throws PortalException
Returns the next scheduled IQueueItem. It does not change its status.

Returns:
scheduled item.
Throws:
PortalException
Since:
6.1.0

waitForQueueReadyToProcess

void waitForQueueReadyToProcess(long timeout)
                                throws InterruptedException
Informs the thread that is is supposed to wait for a process to enter queue or wait timeout before waking up.

Parameters:
timeout - max time to wait for a process to enter the queue.
Throws:
InterruptedException - when the thread is waken.
Since:
6.1.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.