O - The operation type.Req - The request type (corresponding to the operation type).public abstract static class SimJQOperation.RequestJAndOrQ<O extends SimEntityOperation,Req extends SimJQOperation.RequestJAndOrQ> extends SimEntityOperation.RequestE<O,Req>
SimQueue and/or a {SimJob}.
Either the job or the queue (or both) must be non-null,
and one of them (non-null) is always the target entity.
| Constructor and Description |
|---|
RequestJAndOrQ(SimJob job,
SimQueue queue)
Creates a new request for a job or queue or both, preferring a non-
null queue as target entity. |
RequestJAndOrQ(SimJob job,
SimQueue queue,
boolean jobIsTarget)
Creates a new request for a job or queue or both, with the option to set the target entity.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Req |
forJob(SimJob job)
Returns a copy of this request for another job.
|
abstract Req |
forJobAndQueue(SimJob job,
SimQueue queue)
Returns a copy of this request for another job and another queue.
|
abstract Req |
forQueue(SimQueue queue)
Returns a copy of this request for another queue.
|
Req |
forTargetEntity(SimEntity newTargetEntity)
Creates a new request in which given new entity replaces the current job or queue.
|
SimJob |
getJob()
Returns the job associated with this request.
|
SimQueue |
getQueue()
Returns the queue associated with this request.
|
getTargetEntityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOperationpublic RequestJAndOrQ(SimJob job, SimQueue queue, boolean jobIsTarget)
Either the job or the queue or both must be non-null.
job - The job.queue - The queue.jobIsTarget - Whether to set the job true) or the queue (false) as the target entity.IllegalArgumentException - If both job and queue are null, or the target entity selected is null.SimEntityOperation.Request,
SimEntityOperation.RequestE,
SimEntityOperation.Request.getTargetEntity()public RequestJAndOrQ(SimJob job, SimQueue queue)
null queue as target entity.
Either the job or the queue or both must be non-null.
If the queue is non-null, it is always the target entity.
If the job is non-null, it becaomes target entity if and only if the queue is null.
job - The job.queue - The queue.IllegalArgumentException - If both job and queue are null.SimEntityOperation.Request,
SimEntityOperation.RequestE,
SimEntityOperation.Request.getTargetEntity()public final SimJob getJob()
Note: job and queue cannot both be null.
null.getQueue(),
SimEntityOperation.RequestE.getTargetEntity()public final SimQueue getQueue()
Note: job and queue cannot both be null.
null.getJob(),
SimEntityOperation.RequestE.getTargetEntity()public abstract Req forJob(SimJob job)
job - The new job, non-null.IllegalArgumentException - If the job is null.UnsupportedOperationException - If this request does not support jobs.public abstract Req forQueue(SimQueue queue)
queue - The new queue, non-null.IllegalArgumentException - If the queue is null.UnsupportedOperationException - If this request does not support queues.public abstract Req forJobAndQueue(SimJob job, SimQueue queue)
job - The new job, non-null.queue - The new queue, non-null.IllegalArgumentException - If the job and/or queue is null.UnsupportedOperationException - If this request does not support jobs or does not support queues.public final Req forTargetEntity(SimEntity newTargetEntity)
In the current object, either the job or the queue is the target entity; the argument given must respect this. In other words, this implementation does not allow a change from job to queue as target entity, or vice versa.
newTargetEntity - The target entity, non-null.IllegalArgumentException - If the target entity is null or does not match the type of the current target entity.forJob(org.javades.jqueues.r5.entity.jq.job.SimJob),
forQueue(org.javades.jqueues.r5.entity.jq.queue.SimQueue),
forJobAndQueue(org.javades.jqueues.r5.entity.jq.job.SimJob, org.javades.jqueues.r5.entity.jq.queue.SimQueue)Copyright © 2018. All rights reserved.