Package com.redwood.scheduler.api.model
Interface Queue
-
- All Superinterfaces:
ApplicationObject
,BusinessKeyObject
,NamedRootObject
,NamedRootObjectComp
,PartitionableObject
,PartitionableObjectComp
,QueueComp
,Readable
,Root
,SchedulerEntity
,SchedulerEntityComp
,UniqueNamedApplicationObject
public interface Queue extends QueueComp, UniqueNamedApplicationObject, Readable
Queue to which jobs are assigned A queue is a logical grouping of jobs. Queues allow control over when jobs run and how many in parallel. The queue has static limits (like ExecutionSize).
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Queue" objects.static String
SEC_PRIV_CONTROL
This privilege can be granted at a group level.static String
SEC_PRIV_CREATE
This privilege can be granted at a group level.static String
SEC_PRIV_DELETE
This privilege can be granted at a group level.static String
SEC_PRIV_EDIT
This privilege can be granted at a group level.static String
SEC_PRIV_EDITJOBS
This privilege can be granted at an instance level.static String
SEC_PRIV_SUBMITONTO
This privilege can be granted at a group level.static String
SEC_PRIV_VIEW
This privilege can be granted at a group level.static String
SEC_PRIV_VIEWJOBS
This privilege can be granted at a group level.static String
SEC_RANK_ALL
This rank is made of the following privileges: create , view , viewJobs , submitOnto , editJobs , control , edit , deletestatic String
SEC_RANK_CREATE
This rank is made of the following privileges: createstatic String
SEC_RANK_DELETE
This rank is made of the following privileges: create , view , viewJobs , editJobs , submitOnto , delete , controlstatic String
SEC_RANK_EDIT
This rank is made of the following privileges: create , view , viewJobs , editJobs , submitOnto , edit , controlstatic String
SEC_RANK_JOBADMINISTRATOR
This rank is made of the following privileges: view , viewJobs , editJobs , submitOntostatic String
SEC_RANK_NONE
This rank has no privileges assigned to it.static String
SEC_RANK_QUEUEADMINISTRATOR
This rank is made of the following privileges: view , viewJobs , controlstatic String
SEC_RANK_SUBMITANDVIEW
This rank is made of the following privileges: view , submitOntostatic String
SEC_RANK_VIEW
This rank is made of the following privileges: viewstatic String
SEC_RANK_VIEWJOBS
This rank is made of the following privileges: view , viewJobsstatic QueryObjectType<Queue>
TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequiredPermission
checkControlPrivilege()
Check whether or not the control action can be performed on this object.RequiredPermission
checkCreatePrivilege()
Check whether or not the create action can be performed on this object.RequiredPermission
checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.RequiredPermission
checkEditJobsPrivilege()
Check whether or not the editJobs action can be performed on this object.RequiredPermission
checkEditPrivilege()
Check whether or not the edit action can be performed on this object.RequiredPermission
checkSubmitOntoPrivilege()
Check whether or not the submitOnto action can be performed on this object.RequiredPermission
checkViewJobsPrivilege()
Check whether or not the viewJobs action can be performed on this object.RequiredPermission
checkViewPrivilege()
Check whether or not the view action can be performed on this object.QueueProvider
createQueueProvider(ProcessServer newProcessServer)
Create a newQueueProvider
linked to this object.Long
getExecutionSize()
Get the value for ExecutionSize.Long
getHoldLevel()
Get the value for HoldLevel.String
getMonitorRootPath()
Get the root path label to use for the queue in the monitor tree.DateTimeZone
getNextWindowChange()
Get the value for NextWindowChange.QueueProvider
getQueueProviderByProcessServer(ProcessServer processServer)
Get the QueueProvider by QueueProvider.RWIterable<QueueProvider>
getQueueProviders()
Get anRWIterable
over an ordered collection ofQueueProviders
.TimeZone
getQueueTimeZone()
Get the QueueTimeZone.QueueStatus
getStatus()
Get the value for Status.TimeWindow
getTimeWindow()
Get the TimeWindow.boolean
hasCompatibleProcessServer(JobDefinition jobDefinition)
Check whether one of the associated ProcessServers is compatible (resources and type) with a JobDefinitionvoid
hold()
Hold the queue, such that further Jobs are not allocated from it.boolean
isHeld()
Get the value for Held.boolean
isInclusive()
Get the value for Inclusive.boolean
isInclusiveConsoleJobs()
Get the value for InclusiveConsoleJobs.boolean
isMonitorOnDashboard()
Get the value for MonitorOnDashboard.boolean
isOpen()
Get the value for Open.boolean
isOverdue()
Get the value for Overdue.void
release()
Release the queue, such that further Jobs can be allocated to a ProcessServer from this Queue.void
setExecutionSize(Long newExecutionSize)
Set the value for ExecutionSize.void
setHeld(boolean newHeld)
Set the value for Held.void
setHoldLevel(Long newHoldLevel)
Set the value for HoldLevel.void
setInclusive(boolean newInclusive)
Set the value for Inclusive.void
setInclusiveConsoleJobs(boolean newInclusiveConsoleJobs)
Set the value for InclusiveConsoleJobs.void
setMonitorOnDashboard(boolean newMonitorOnDashboard)
Set the value for MonitorOnDashboard.void
setOverdue(boolean newOverdue)
Set the value for Overdue.void
setQueueTimeZone(TimeZone newQueueTimeZone)
Set the value for QueueTimeZone.void
setTimeWindow(TimeWindow newTimeWindow)
Set the value for TimeWindow.-
Methods inherited from interface com.redwood.scheduler.api.model.ApplicationObject
getParentApplication, setParentApplication
-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.NamedRootObject
createObjectReference, getComment, getDescription, getLinkedObjectReferenceByLinkedObject, getLinkedObjectReferenceByName, getLinkedObjectReferences, getName, getSearchName, getSourceObjectReferences, isHidden, setComment, setDescription, setName
-
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableObject
createObjectTag, getEditablePartitions, getObjectTagByObjectTagDefinition, getObjectTags, getPartition, setPartition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()
for "Queue" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<Queue> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...)
.
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
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_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- 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_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- 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. IfIncludeWaitingJobs
istrue
this includes jobs in Executing and Idle JobStatusStates. IfIncludeWaitingJobs
isfalse
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. (DoesExecutionSize
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. (DoesExecutionSize
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 benull
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. IfIncludeWaitingJobs
istrue
this includes jobs in Executing and Idle JobStatusStates. IfIncludeWaitingJobs
isfalse
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. (DoesExecutionSize
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. (DoesExecutionSize
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.
-
getQueueProviders
RWIterable<QueueProvider> getQueueProviders()
Get anRWIterable
over an ordered collection ofQueueProviders
. If the collection is empty, an empty iterator will be returned, that is, this method will never returnnull
. The queues attached to a process server.- Specified by:
getQueueProviders
in interfaceQueueComp
- Returns:
- An
RWIterable
over an ordered collection ofQueueProvider
objects .
-
createQueueProvider
QueueProvider createQueueProvider(ProcessServer newProcessServer)
Create a newQueueProvider
linked to this object.- Parameters:
newProcessServer
- The other parent of theQueueProviderProcessServer
association.- Returns:
- a new
QueueProvider
.
-
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.
-
-