lumis.portal.processqueue
Class QueueTaskScheduleConfig

Package class diagram package QueueTaskScheduleConfig
java.lang.Object
  extended by lumis.portal.processqueue.QueueTaskScheduleConfig

public class QueueTaskScheduleConfig
extends Object

Configuration for the scheduling of a IQueueTask.

The same configuration object may be reused for different calls to IProcessQueueManager.schedule(IQueueTask, QueueTaskScheduleConfig). Changes to this configuration object will have no effect on tasks already scheduled with it. This class is not thread-safe.

Since:
7.0.0

Constructor Summary
QueueTaskScheduleConfig()
           
 
Method Summary
 Set<String> getExclusiveLocks()
          Returns the exclusive locks for this task.
 String getOwnerId()
          Returns the owner identifier set in this configuration.
 Date getScheduledDateTime()
          Returns the scheduled date-time for the execution of the task.
 Set<String> getSharedLocks()
          Returns the shared locks for this task.
 String getTitle()
          Returns the title for the task set in this configuration.
 void setOwnerId(String ownerId)
          Sets the identifier of the task's owner.
 void setScheduledDateTime(Date scheduledDateTime)
          Sets the scheduled date-time for the execution of the task.
 void setTitle(String title)
          Sets the title for the task, to help identify it in the task queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueueTaskScheduleConfig

public QueueTaskScheduleConfig()
Method Detail

getTitle

public String getTitle()
Returns the title for the task set in this configuration. It is intended to help identify the task in the task queue.

If this property is null, an automatic title will be used when the task is scheduled. It is strongly recommended to specify the title to help troubleshooting.

Returns:
the title, or null if it has not been configured.
Since:
7.0.0
See Also:
setTitle(String)

setTitle

public void setTitle(String title)
Sets the title for the task, to help identify it in the task queue.

If this property is null, an automatic title will be used when the task is scheduled. It is strongly recommended to specify the title to help troubleshooting.

Parameters:
title - the title.
Since:
7.0.0

getOwnerId

public String getOwnerId()
Returns the owner identifier set in this configuration.

Returns:
the owner identifier set in this configuration, or null if it was not set.
Since:
7.0.0
See Also:
setOwnerId(String)

setOwnerId

public void setOwnerId(String ownerId)
Sets the identifier of the task's owner. Its exact meaning is not known by the process queue framework, and is intended to allow the framework's client to query tasks of a specific owner.

Parameters:
ownerId - the identifier of the owner of the task. It must be a guid, or null if no owner information is to be stored.
Since:
7.0.0

getScheduledDateTime

public Date getScheduledDateTime()
Returns the scheduled date-time for the execution of the task.

Returns:
the scheduled date-time, or null if the task has no constraint on the date-time to be available to run.
Since:
7.0.0

setScheduledDateTime

public void setScheduledDateTime(Date scheduledDateTime)
Sets the scheduled date-time for the execution of the task. If set, the task will not run before the specified date-time. While its scheduled date-time is not reached, any locks in it will not block any other process.

Parameters:
scheduledDateTime - the scheduled date-time, or null if the task has no constraint on the date-time to be available to run.
Since:
7.0.0

getSharedLocks

public Set<String> getSharedLocks()
Returns the shared locks for this task.

A task with a shared lock will not allow any newer task with the same value as an exclusive lock to execute before it.

Returns:
a modifiable set containing the shared locks for this task configuration. Any change on the set will be applied to this configuration.
Since:
7.0.0
See Also:
getExclusiveLocks(), lumis.portal.processqueue

getExclusiveLocks

public Set<String> getExclusiveLocks()
Returns the exclusive locks for this task.

A task with an exclusive lock will not allow any newer task with the same value as either shared or exclusive lock to execute before it.

The task process identifier, returned by IProcessQueueManager.schedule(lumis.portal.processqueue.IQueueTask, lumis.portal.processqueue.QueueTaskScheduleConfig), will automatically be included as an exclusive lock, but it will not be present at the returned set.

Returns:
a modifiable set containing the exclusive locks for this task configuration. Any change on the set will be applied to this configuration.
Since:
7.0.0
See Also:
getSharedLocks(), lumis.portal.processqueue


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