moveRequestToResourcePool

protected fun moveRequestToResourcePool(request: ProcessModel.Entity.ResourcePoolRequest, currentQueue: RequestQ, pool: ResourcePoolWithQ, resourceSelectionRule: ResourceSelectionRuleIfc, resumePriority: Int, waitStats: Boolean = false)(source)

A request, in a request queue, is there because it's entity is suspended. This function will remove the supplied request from the specified queue and place it in the queue associated with the specified resource pool. If the resource pool has units of capacity available to satisfy the request, then the entity is resumed to allow the units to be allocated. If the resource pool does not have sufficient units to satisfy the request, the entity stays suspended within the resource pool's queue and will be processed as a normal request for the resource pool.

The specified resource pool must not be associated with the request. The request must be queued and in the specified queue. The entity must currently be suspended and must be associated with the supplied request. The request must be a request for a resource pool to move to another pool.

Parameters

request

the request to move

currentQueue

the queue that the request is currently in

pool

the new resource pool that the request to be for

resourceSelectionRule

the resource selection rule to use when checking if the request can be allocated units from its new pool

resumePriority

the priority of the resume if the request can be resumed

waitStats

indicated whether the removal of the request from its current queue will cause waiting time statistics to be collected for that queue. The default is false.