Class 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
    Version:
    $Revision: 15055 $ $Date: 2012-11-29 18:48:37 -0200 (Thu, 29 Nov 2012) $
    • 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