removeAndTerminate

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.

Parameters

request

the request to remove from the queue

waitStats

if true the waiting time statistics are collected on the usage of the queue. The default is false.

afterTermination

a function to invoke after the process is successfully terminated