new JobQueueCapabilities(capabilities, allowExclusiveJobsopt, capacityopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
capabilities |
number | |||
allowExclusiveJobs |
boolean |
<optional> |
false | Optional. Defaults to false. A boolean that indicates whether jobs that require the whole queue's capabilities are allowed on this queue. Such jobs have a cost equal to or higher than the queue's capabilities. |
capacity |
Number |
<optional> |
Optional. The maximum capacity of this JobQueue. Only has an effect if the chosen policy is not set to ignore excess items. The maximum capacity is the total amount of Jobs either currently running or in the backlog this JobQueue can accomodate. | |
Optional. |
JobQueueCapacityPolicy | Number | The policy to use when the maximum capacity is reached, and new items are being enqueued. |
- Source:
Members
backlogCost
- Source:
capabilitiesFree
Returns the remaining capabilities. Exclusive jobs may use more capabilities
than this queue provides. However, this property can at minimum only return
0 (zero) (i.e. not negative values).
- Source:
capabilitiesUsed
- Source:
isBusy
Only returns true, iff the remaining capabilities are exactly 0 (zero).
- Source:
load
- Source:
utilization
- Source:
Methods
addJob(job, costopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
job |
Job | producerHandler.<Promise.<T>> | ||
cost |
number |
<optional> |
- Source: