public static final class SimQueueEvent.Operation<J extends SimJob,Q extends SimQueue> extends SimQueueEvent<J,Q>
SimEvent requesting a SimEntityOperation at a specific SimQueue.
The event always has a non-null SimEventAction, even if used as a notification.
SimQueueEvent.Operation<J extends SimJob,Q extends SimQueue>, SimQueueEvent.QueueAccessVacation<J extends SimJob,Q extends SimQueue>, SimQueueEvent.ServerAccessCredits<J extends SimJob,Q extends SimQueue>, SimQueueEvent.StartArmed<J extends SimJob,Q extends SimQueue>SimJQEvent.Arrival<J extends SimJob,Q extends SimQueue>, SimJQEvent.AutoRevocation<J extends SimJob,Q extends SimQueue>, SimJQEvent.Departure<J extends SimJob,Q extends SimQueue>, SimJQEvent.Drop<J extends SimJob,Q extends SimQueue>, SimJQEvent.Revocation<J extends SimJob,Q extends SimQueue>, SimJQEvent.Start<J extends SimJob,Q extends SimQueue>SimEntityEvent.Reset, SimEntityEvent.Update| Constructor and Description |
|---|
Operation(Q queue,
double time,
SimEntityOperation.Request request)
Creates an operation event at a specific queue.
|
| Modifier and Type | Method and Description |
|---|---|
SimQueueEvent.Operation |
copyForQueueAndJob(Q newQueue,
J newJob)
Creates a new operation event at given queue (if non-
null) with given new job (if non-null). |
SimEntityOperation.Request |
getRequest()
Returns the operation request of this event.
|
getJob, getQueuegetEntitypublic Operation(Q queue, double time, SimEntityOperation.Request request)
The event is provided with an appropriate non-null new SimEventAction,
invoking SimEntity.doOperation(double, Req).
queue - The queue at which to perform the operation.time - The time at which to perform the operation.request - The operation request for the queue.IllegalArgumentException - If the queue or request is null.SimEntity.doOperation(double, Req)public SimQueueEvent.Operation copyForQueueAndJob(Q newQueue, J newJob)
null) with given new job (if non-null).
Special care is taken of "migrating" the request to the new job and/or queue.
However, a fool-proof approach is not yet within reach.
The current implementation throws an UnsupportedOperationException
for request that are not of type SimJQOperation.RequestJAndOrQ.
copyForQueueAndJob in class SimJQEvent<J extends SimJob,Q extends SimQueue>newQueue - The new queue (the SimQueue to which the newly created event applies).newJob - The new job (the SimQueue to which the newly created event applies).null).IllegalArgumentException - If the request is of unsupported type,
or if illegal arguments are provided for the specific operation.getRequest(),
SimJQOperation.RequestJAndOrQ,
SimJQOperation.RequestJAndOrQ.forJob(org.javades.jqueues.r5.entity.jq.job.SimJob),
SimJQOperation.RequestJAndOrQ.forQueue(org.javades.jqueues.r5.entity.jq.queue.SimQueue),
SimJQOperation.RequestJAndOrQ.forJobAndQueue(org.javades.jqueues.r5.entity.jq.job.SimJob, org.javades.jqueues.r5.entity.jq.queue.SimQueue)public final SimEntityOperation.Request getRequest()
null.Copyright © 2018. All rights reserved.