public abstract class SimJQEvent<J extends SimJob,Q extends SimQueue> extends SimEntityEvent
SimEvent for a SimEntity operation on (both) jobs and queues.
This class only administers the key parameters for the event; it does not actually schedule it.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
| Modifier and Type | Class and Description |
|---|---|
static class |
SimJQEvent.Arrival<J extends SimJob,Q extends SimQueue>
An arrival
SimEvent of a job at a queue. |
static class |
SimJQEvent.AutoRevocation<J extends SimJob,Q extends SimQueue>
An auto-revocation
SimEvent of a job at a queue. |
static class |
SimJQEvent.Departure<J extends SimJob,Q extends SimQueue>
A departure
SimEvent of a job at a queue. |
static class |
SimJQEvent.Drop<J extends SimJob,Q extends SimQueue>
A drop
SimEvent of a job at a queue. |
static class |
SimJQEvent.Revocation<J extends SimJob,Q extends SimQueue>
A revocation
SimEvent (request) of a job at a queue. |
static class |
SimJQEvent.Start<J extends SimJob,Q extends SimQueue>
A start
SimEvent of a job at a queue. |
SimEntityEvent.Reset, SimEntityEvent.Update| Modifier | Constructor and Description |
|---|---|
protected |
SimJQEvent(String name,
double time,
Q queue,
J job,
org.javades.jsimulation.r5.SimEventAction<? extends SimEntity> action)
Creates a new event for a queue.
|
| Modifier and Type | Method and Description |
|---|---|
abstract SimJQEvent<J,Q> |
copyForQueueAndJob(Q newQueue,
J newJob)
Creates a copy of this event, but for a different queue and/or a different job.
|
J |
getJob()
Gets the job (if applicable) to which the event applies.
|
Q |
getQueue()
Gets the queue (if applicable) at which the event occurs.
|
getEntityprotected SimJQEvent(String name, double time, Q queue, J job, org.javades.jsimulation.r5.SimEventAction<? extends SimEntity> action)
name - The (optional) name of the event, may be null.time - The time at which the event occurs.queue - The queue related to the event (if applicable), may be null.job - The job related to the event (if applicable), may be null.action - The SimEventAction to take; may be null.public abstract SimJQEvent<J,Q> copyForQueueAndJob(Q newQueue, J newJob)
When a parameter is null, it is left untouched.
The event's action, if non-null, has to be copied into an action retrofitted to the new queue and/or job.
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).IllegalArgumentException - If (the combination of) the new queue and/or new job is illegal for this event type.UnsupportedOperationException - If the event cannot be copied for the new values of queue and job,
for instance, because of lack of knowledge on the SimEventAction present.public final Q getQueue()
null.public final J getJob()
null.Copyright © 2018. All rights reserved.