RequestQ

class RequestQ @JvmOverloads constructor(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO) : Queue<ProcessModel.Entity.Request> (source)

If the user supplies a request selection rule then the default queue discipline will order the requests for finding the next request from the queue based on the rule. The rule may cause the ordering of requests to be presented in a different order than strictly implied by the queue discipline. For example, a later arriving request may "jump" forward in the queue if the rule selects it.

Parameters

parent

containing model element

name

the name of the queue

discipline

the queue discipline for ordering the queue

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null, discipline: Queue.Discipline = Discipline.FIFO)

Properties

Functions

Link copied to clipboard

Returns the number of requests targeting the supplied resource that are waiting in the queue.

Returns the number of requests targeting the supplied resource pool that are waiting in the queue.

Returns the number of requests targeting the supplied movable resource pool that are waiting in the queue.

Link copied to clipboard
fun removeAllAndTerminate(waitStats: Boolean = false, afterTermination: (entity: ProcessModel.Entity) -> Unit? = null)

Removes and terminates all the requests waiting in the queue

Link copied to clipboard
fun removeAndTerminate(request: ProcessModel.Entity.Request, waitStats: Boolean = false, afterTermination: (entity: ProcessModel.Entity) -> Unit? = null)

Removes the request from the queue and tells the associated entity to terminate its process. The process that was suspended because the entity's request was placed in the queue is immediately terminated.