Interface Queue

    • Field Detail

      • SEC_PRIV_VIEW

        static final String SEC_PRIV_VIEW
        This privilege can be granted at a group level. This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_PRIV_VIEWJOBS

        static final String SEC_PRIV_VIEWJOBS
        This privilege can be granted at a group level. This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_PRIV_SUBMITONTO

        static final String SEC_PRIV_SUBMITONTO
        This privilege can be granted at a group level. This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_PRIV_EDITJOBS

        static final String SEC_PRIV_EDITJOBS
        This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_PRIV_CONTROL

        static final String SEC_PRIV_CONTROL
        This privilege can be granted at a group level. This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_PRIV_EDIT

        static final String SEC_PRIV_EDIT
        This privilege can be granted at a group level. This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_PRIV_DELETE

        static final String SEC_PRIV_DELETE
        This privilege can be granted at a group level. This privilege can be granted at an instance level.
        See Also:
        Constant Field Values
      • SEC_RANK_CREATE

        static final String SEC_RANK_CREATE
        This rank is made of the following privileges: create
        See Also:
        Constant Field Values
      • SEC_RANK_VIEWJOBS

        static final String SEC_RANK_VIEWJOBS
        This rank is made of the following privileges: view , viewJobs
        See Also:
        Constant Field Values
      • SEC_RANK_QUEUEADMINISTRATOR

        static final String SEC_RANK_QUEUEADMINISTRATOR
        This rank is made of the following privileges: view , viewJobs , control
        See Also:
        Constant Field Values
      • SEC_RANK_JOBADMINISTRATOR

        static final String SEC_RANK_JOBADMINISTRATOR
        This rank is made of the following privileges: view , viewJobs , editJobs , submitOnto
        See Also:
        Constant Field Values
      • SEC_RANK_SUBMITANDVIEW

        static final String SEC_RANK_SUBMITANDVIEW
        This rank is made of the following privileges: view , submitOnto
        See Also:
        Constant Field Values
      • SEC_RANK_EDIT

        static final String SEC_RANK_EDIT
        This rank is made of the following privileges: create , view , viewJobs , editJobs , submitOnto , edit , control
        See Also:
        Constant Field Values
      • SEC_RANK_DELETE

        static final String SEC_RANK_DELETE
        This rank is made of the following privileges: create , view , viewJobs , editJobs , submitOnto , delete , control
        See Also:
        Constant Field Values
      • SEC_RANK_ALL

        static final String SEC_RANK_ALL
        This rank is made of the following privileges: create , view , viewJobs , submitOnto , editJobs , control , edit , delete
        See Also:
        Constant Field Values
    • Method Detail

      • getExecutionSize

        Long getExecutionSize()
        Get the value for ExecutionSize. (ExecutionSize is the maximum number of concurrent executing jobs allowed in the queue. If IncludeWaitingJobs is true this includes jobs in Executing and Idle JobStatusStates. If IncludeWaitingJobs is false then this only includes the jobs in the Executing JobStatusState.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isHeld

        boolean isHeld()
        Get the value for Held. (Is the queue on hold?)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getHoldLevel

        Long getHoldLevel()
        Get the value for HoldLevel. (In the queue, jobs having a priority below the specified number will not be started)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isInclusive

        boolean isInclusive()
        Get the value for Inclusive. (Does ExecutionSize include waiting jobs?)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isInclusiveConsoleJobs

        boolean isInclusiveConsoleJobs()
        Get the value for InclusiveConsoleJobs. (Does ExecutionSize include jobs in Console status?)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isMonitorOnDashboard

        boolean isMonitorOnDashboard()
        Get the value for MonitorOnDashboard. (Should the queue be monitored on the dashboard? This is a calculated field, stored in an object tag, and may be deleted in the future.)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getNextWindowChange

        DateTimeZone getNextWindowChange()
        Get the value for NextWindowChange. (The next date on which the time window will open or close the queue again)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isOverdue

        boolean isOverdue()
        Get the value for Overdue. (Set the scripts that are not run within their timewindow to OVERDUE?)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isOpen

        boolean isOpen()
        Get the value for Open. (Is the queue open?)
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getStatus

        QueueStatus getStatus()
        Get the value for Status. (Return a description of the queue status.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setExecutionSize

        void setExecutionSize​(Long newExecutionSize)
        Set the value for ExecutionSize. (ExecutionSize is the maximum number of concurrent executing jobs allowed in the queue. If IncludeWaitingJobs is true this includes jobs in Executing and Idle JobStatusStates. If IncludeWaitingJobs is false then this only includes the jobs in the Executing JobStatusState.) This value is optional.
        Parameters:
        newExecutionSize - the new value for ExecutionSize.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setHeld

        void setHeld​(boolean newHeld)
        Set the value for Held. (Is the queue on hold?)
        Parameters:
        newHeld - the new value for Held.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setHoldLevel

        void setHoldLevel​(Long newHoldLevel)
        Set the value for HoldLevel. (In the queue, jobs having a priority below the specified number will not be started) This value is optional.
        Parameters:
        newHoldLevel - the new value for HoldLevel.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setInclusive

        void setInclusive​(boolean newInclusive)
        Set the value for Inclusive. (Does ExecutionSize include waiting jobs?)
        Parameters:
        newInclusive - the new value for Inclusive.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setInclusiveConsoleJobs

        void setInclusiveConsoleJobs​(boolean newInclusiveConsoleJobs)
        Set the value for InclusiveConsoleJobs. (Does ExecutionSize include jobs in Console status?)
        Parameters:
        newInclusiveConsoleJobs - the new value for InclusiveConsoleJobs.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setMonitorOnDashboard

        void setMonitorOnDashboard​(boolean newMonitorOnDashboard)
        Set the value for MonitorOnDashboard. (Should the queue be monitored on the dashboard? This is a calculated field, stored in an object tag, and may be deleted in the future.)
        Parameters:
        newMonitorOnDashboard - the new value for MonitorOnDashboard.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setOverdue

        void setOverdue​(boolean newOverdue)
        Set the value for Overdue. (Set the scripts that are not run within their timewindow to OVERDUE?)
        Parameters:
        newOverdue - the new value for Overdue.
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getMonitorRootPath

        String getMonitorRootPath()
        Get the root path label to use for the queue in the monitor tree. Depends on the configuration/Monitoring/MonitorRootPath registry key: (a) KeyValue = PartitionColonNonGlobal (default) -> if partition is GLOBAL return QueueName else return Partition:QueueName. (b) KeyValue = PartitionColonAlways -> Always return Partition:QueueName. (c) KeyValue = PartitionPathAlways -> Always return Partition/QueueName.
        Returns:
        The String to use as the root path in the monitor tree
      • hasCompatibleProcessServer

        boolean hasCompatibleProcessServer​(JobDefinition jobDefinition)
        Check whether one of the associated ProcessServers is compatible (resources and type) with a JobDefinition
        Parameters:
        jobDefinition - The JobDefinition to check
        Returns:
        True if a compatible ProcessServer exists
      • hold

        void hold()
        Hold the queue, such that further Jobs are not allocated from it.
      • release

        void release()
        Release the queue, such that further Jobs can be allocated to a ProcessServer from this Queue.
      • getQueueTimeZone

        TimeZone getQueueTimeZone()
        Get the QueueTimeZone.
        Returns:
        QueueTimeZone
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getTimeWindow

        TimeWindow getTimeWindow()
        Get the TimeWindow.
        Returns:
        TimeWindow
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • setQueueTimeZone

        void setQueueTimeZone​(TimeZone newQueueTimeZone)
        Set the value for QueueTimeZone. This value is optional.
        Parameters:
        newQueueTimeZone - is the object to set QueueTimeZone to. The timezone to use for Queue TimeWindow calculations.
      • setTimeWindow

        void setTimeWindow​(TimeWindow newTimeWindow)
        Set the value for TimeWindow. This value is optional.
        Parameters:
        newTimeWindow - is the object to set TimeWindow to. The time window when this queue is open.
      • getQueueProviderByProcessServer

        QueueProvider getQueueProviderByProcessServer​(ProcessServer processServer)
        Get the QueueProvider by QueueProvider.
        Parameters:
        processServer -
        Returns:
        the QueueProvider, or null if it could not be found
      • checkCreatePrivilege

        RequiredPermission checkCreatePrivilege()
        Check whether or not the create action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkViewJobsPrivilege

        RequiredPermission checkViewJobsPrivilege()
        Check whether or not the viewJobs action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkSubmitOntoPrivilege

        RequiredPermission checkSubmitOntoPrivilege()
        Check whether or not the submitOnto action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditJobsPrivilege

        RequiredPermission checkEditJobsPrivilege()
        Check whether or not the editJobs action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkControlPrivilege

        RequiredPermission checkControlPrivilege()
        Check whether or not the control action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkEditPrivilege

        RequiredPermission checkEditPrivilege()
        Check whether or not the edit action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
      • checkDeletePrivilege

        RequiredPermission checkDeletePrivilege()
        Check whether or not the delete action can be performed on this object.
        Returns:
        a RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.