public final class SimQueueQoSUtils extends Object
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimQueueOrJobQoS,
SimJobQoS,
SimQueueQoS| Modifier and Type | Method and Description |
|---|---|
static <J extends SimJob,Q extends SimQueueQoS,P> |
getAndCheckJobQoS(J job,
Q queue)
Gets the (validated) QoS value for given job at given queue (where the job does not have to be present on the queue yet).
|
public static <J extends SimJob,Q extends SimQueueQoS,P> P getAndCheckJobQoS(J job, Q queue)
The QoS value is validated in the sense that if the SimJob returns a non-null
SimQoS.getQoSClass(), the class or interface returned must be a sub-class or sub-interface
of the queue's SimQueueOrJobQoS.getQoSClass(), in other words,
the job's QoS structure must be compatible with that of the queue.
In addition, if the job returns a non-null SimQoS.getQoSClass(),
it must return a non-null QoS value from SimQoS.getQoS(),
and this QoS value must be an instance of the reported job QoS class.
In all other case, including the case in which the job is null,
an IllegalArgumentException is thrown.
J - The type of SimJobs supported.Q - The type of SimQueueQoSs supported.P - The type used for QoS.job - The job, non-null.queue - The queue, non-null.null QoS class and value.IllegalArgumentException - If the job or queue is null or if one or more QoS-related sanity checks fail.Copyright © 2018. All rights reserved.