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 StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "Queue" objects.static StringSEC_PRIV_CONTROLThis privilege can be granted at a group level.static StringSEC_PRIV_CREATEThis privilege can be granted at a group level.static StringSEC_PRIV_DELETEThis privilege can be granted at a group level.static StringSEC_PRIV_EDITThis privilege can be granted at a group level.static StringSEC_PRIV_EDITJOBSThis privilege can be granted at an instance level.static StringSEC_PRIV_SUBMITONTOThis privilege can be granted at a group level.static StringSEC_PRIV_VIEWThis privilege can be granted at a group level.static StringSEC_PRIV_VIEWJOBSThis privilege can be granted at a group level.static StringSEC_RANK_ALLThis rank is made of the following privileges: create , view , viewJobs , submitOnto , editJobs , control , edit , deletestatic StringSEC_RANK_CREATEThis rank is made of the following privileges: createstatic StringSEC_RANK_DELETEThis rank is made of the following privileges: create , view , viewJobs , editJobs , submitOnto , delete , controlstatic StringSEC_RANK_EDITThis rank is made of the following privileges: create , view , viewJobs , editJobs , submitOnto , edit , controlstatic StringSEC_RANK_JOBADMINISTRATORThis rank is made of the following privileges: view , viewJobs , editJobs , submitOntostatic StringSEC_RANK_NONEThis rank has no privileges assigned to it.static StringSEC_RANK_QUEUEADMINISTRATORThis rank is made of the following privileges: view , viewJobs , controlstatic StringSEC_RANK_SUBMITANDVIEWThis rank is made of the following privileges: view , submitOntostatic StringSEC_RANK_VIEWThis rank is made of the following privileges: viewstatic StringSEC_RANK_VIEWJOBSThis rank is made of the following privileges: view , viewJobsstatic QueryObjectType<Queue>TYPEType 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 RequiredPermissioncheckControlPrivilege()Check whether or not the control action can be performed on this object.RequiredPermissioncheckCreatePrivilege()Check whether or not the create action can be performed on this object.RequiredPermissioncheckDeletePrivilege()Check whether or not the delete action can be performed on this object.RequiredPermissioncheckEditJobsPrivilege()Check whether or not the editJobs action can be performed on this object.RequiredPermissioncheckEditPrivilege()Check whether or not the edit action can be performed on this object.RequiredPermissioncheckSubmitOntoPrivilege()Check whether or not the submitOnto action can be performed on this object.RequiredPermissioncheckViewJobsPrivilege()Check whether or not the viewJobs action can be performed on this object.RequiredPermissioncheckViewPrivilege()Check whether or not the view action can be performed on this object.QueueProvidercreateQueueProvider(ProcessServer newProcessServer)Create a newQueueProviderlinked to this object.LonggetExecutionSize()Get the value for ExecutionSize.LonggetHoldLevel()Get the value for HoldLevel.StringgetMonitorRootPath()Get the root path label to use for the queue in the monitor tree.DateTimeZonegetNextWindowChange()Get the value for NextWindowChange.QueueProvidergetQueueProviderByProcessServer(ProcessServer processServer)Get the QueueProvider by QueueProvider.RWIterable<QueueProvider>getQueueProviders()Get anRWIterableover an ordered collection ofQueueProviders.TimeZonegetQueueTimeZone()Get the QueueTimeZone.QueueStatusgetStatus()Get the value for Status.TimeWindowgetTimeWindow()Get the TimeWindow.booleanhasCompatibleProcessServer(JobDefinition jobDefinition)Check whether one of the associated ProcessServers is compatible (resources and type) with a JobDefinitionvoidhold()Hold the queue, such that further Jobs are not allocated from it.booleanisHeld()Get the value for Held.booleanisInclusive()Get the value for Inclusive.booleanisInclusiveConsoleJobs()Get the value for InclusiveConsoleJobs.booleanisMonitorOnDashboard()Get the value for MonitorOnDashboard.booleanisOpen()Get the value for Open.booleanisOverdue()Get the value for Overdue.voidrelease()Release the queue, such that further Jobs can be allocated to a ProcessServer from this Queue.voidsetExecutionSize(Long newExecutionSize)Set the value for ExecutionSize.voidsetHeld(boolean newHeld)Set the value for Held.voidsetHoldLevel(Long newHoldLevel)Set the value for HoldLevel.voidsetInclusive(boolean newInclusive)Set the value for Inclusive.voidsetInclusiveConsoleJobs(boolean newInclusiveConsoleJobs)Set the value for InclusiveConsoleJobs.voidsetMonitorOnDashboard(boolean newMonitorOnDashboard)Set the value for MonitorOnDashboard.voidsetOverdue(boolean newOverdue)Set the value for Overdue.voidsetQueueTimeZone(TimeZone newQueueTimeZone)Set the value for QueueTimeZone.voidsetTimeWindow(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. IfIncludeWaitingJobsistruethis includes jobs in Executing and Idle JobStatusStates. IfIncludeWaitingJobsisfalsethen 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. (DoesExecutionSizeinclude 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. (DoesExecutionSizeinclude 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 benullif 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. IfIncludeWaitingJobsistruethis includes jobs in Executing and Idle JobStatusStates. IfIncludeWaitingJobsisfalsethen 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. (DoesExecutionSizeinclude 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. (DoesExecutionSizeinclude 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 anRWIterableover 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:
getQueueProvidersin interfaceQueueComp- Returns:
- An
RWIterableover an ordered collection ofQueueProviderobjects .
-
createQueueProvider
QueueProvider createQueueProvider(ProcessServer newProcessServer)
Create a newQueueProviderlinked to this object.- Parameters:
newProcessServer- The other parent of theQueueProviderProcessServerassociation.- Returns:
- a new
QueueProvider.
-
getQueueProviderByProcessServer
QueueProvider getQueueProviderByProcessServer(ProcessServer processServer)
Get the QueueProvider by QueueProvider.- Parameters:
processServer-- Returns:
- the QueueProvider, or
nullif it could not be found
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance 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
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-