public class SUR<J extends SimJob,Q extends SUR> extends AbstractClassicSimQueue<J,Q>
Serve-Until-Relieved (Serve-Until-Next).
This implementation has infinite buffer size (relevant for server-access credits) and a single server.
This class ignores the requested service-time supplied by a visiting job. Jobs are simply served until the next arrival/start, and the assumption in this queueing system is that the service obtained until the next arrival is exactly the service required. Given that interpretation, this queueing system is non-preemptive. However, we admit that a preemptive interpretation is also possible, given the same results in terms of job visits.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
WURAbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyeventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Constructor and Description |
|---|
SUR(org.javades.jsimulation.r5.SimEventList eventList)
Creates a single-server SUR queue with infinite buffer size given an event list.
|
| Modifier and Type | Method and Description |
|---|---|
SUR<J,Q> |
getCopySimQueue()
Returns a new
SUR object on the same SimEventList. |
Object |
getQoS()
Calls super method (in order to make implementation final).
|
Class |
getQoSClass()
Calls super method (in order to make implementation final).
|
protected double |
getServiceTimeForJob(J job)
Throws
IllegalStateException. |
protected void |
insertJobInQueueUponArrival(J job,
double time)
Does nothing.
|
protected void |
insertJobInQueueUponStart(J job,
double time)
Does nothing.
|
boolean |
isStartArmed()
Returns
true. |
protected void |
queueAccessVacationDropSubClass(double time,
J job)
Calls super method (in order to make implementation final).
|
protected void |
removeJobFromQueueUponDeparture(J departingJob,
double time)
Does nothing.
|
protected void |
removeJobFromQueueUponDrop(J job,
double time)
Does nothing.
|
protected void |
removeJobFromQueueUponRevokation(J job,
double time,
boolean auto)
Does nothing.
|
protected void |
rescheduleAfterArrival(J job,
double time)
Starts the arrived job if server-access credits are available.
|
protected void |
rescheduleAfterDeparture(J departedJob,
double time)
Does nothing.
|
protected void |
rescheduleAfterDrop(J job,
double time)
Does nothing.
|
protected void |
rescheduleAfterRevokation(J job,
double time,
boolean auto)
Does nothing.
|
protected void |
rescheduleAfterStart(J job,
double time)
Departs the first job in
AbstractSimQueue.getJobsInServiceArea() if it is not the only job in the service area. |
protected void |
rescheduleForNewServerAccessCredits(double time)
Starts jobs as long as there are server-access credits and jobs waiting.
|
protected void |
resetEntitySubClass()
Calls super method (in order to make implementation final).
|
protected void |
setServerAccessCreditsSubClass()
Calls super method (in order to make implementation final).
|
String |
toStringDefault()
Returns "SUR".
|
getBufferSize, getNumberOfServersarrive, autoRevoke, cancelDepartureEvent, cancelDepartureEvent, depart, departureFromEventList, drop, getAutoRevocationPolicy, getDepartureEvents, getDepartureEvents, getFirstJob, getFirstJobInServiceArea, getFirstJobInWaitingArea, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, hasJobs, hasJobsInServiceArea, hasJobsInWaitingArea, hasServerAcccessCredits, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, registerStdOutSimQueueListener, revoke, revoke, scheduleDepartureEvent, scheduleJobArrival, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCredits, start, takeServerAccessCredit, triggerPotentialNewStartArmed, unregisterStdOutSimQueueListeneraddPendingNotification, addPendingNotification, clearAndUnlockPendingNotificationsIfLocked, delegateOperation, doAfterNotifications, doOperation, fireAndLockPendingNotifications, getEventList, getLastUpdateTime, getRegisteredDelegatedOperations, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, notifyEventListReset, registerDelegatedOperation, registerNotificationType, registerOperation, registerPreEventHook, registerPreNotificationHook, registerPreUpdateHook, registerSimEntityListener, registerStdOutSimEntityListener, removeDelegationForOperation, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, toString, unregisterSimEntityListener, unregisterStdOutSimEntityListener, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarrive, getAutoRevocationPolicy, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, revoke, revoke, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCreditsdoAfterNotifications, doOperation, getEventList, getLastUpdateTime, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, registerSimEntityListener, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, unregisterSimEntityListener, updatepublic SUR(org.javades.jsimulation.r5.SimEventList eventList)
eventList - The event list to use.public SUR<J,Q> getCopySimQueue()
SUR object on the same SimEventList.SUR object on the same SimEventList.AbstractSimEntity.getEventList()public String toStringDefault()
toStringDefault in interface SimEntitytoStringDefault in class AbstractSimQueue<J extends SimJob,Q extends SUR>SimEntity.setName(java.lang.String),
Object.toString()public final Class getQoSClass()
null.public final Object getQoS()
null.protected final void resetEntitySubClass()
resetEntitySubClass in class AbstractSimQueue<J extends SimJob,Q extends SUR>SimEntity.resetEntity()protected final void insertJobInQueueUponArrival(J job, double time)
insertJobInQueueUponArrival in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job that arrived.time - The current time (i.e., arrival time of the job).rescheduleAfterArrival(J, double)protected final void rescheduleAfterArrival(J job, double time)
rescheduleAfterArrival in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job that arrived (and is already present in AbstractSimQueue.getJobs()).time - The current time (i.e., the arrival time of the job).AbstractSimQueue.hasServerAcccessCredits(),
AbstractSimQueue.start(double, J),
insertJobInQueueUponArrival(J, double)protected final void queueAccessVacationDropSubClass(double time,
J job)
queueAccessVacationDropSubClass in class AbstractSimQueue<J extends SimJob,Q extends SUR>time - The time the job was dropped, i.e., the current time.job - The dropped job.AbstractSimQueue.arrive(double, J),
AbstractSimQueue.setQueueAccessVacation(double, boolean)protected final void removeJobFromQueueUponDrop(J job, double time)
removeJobFromQueueUponDrop in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job that is to be dropped.time - The current time (i.e., drop time of the job).AbstractSimQueue.drop(J, double),
AbstractSimQueue.rescheduleAfterDrop(J, double)protected final void rescheduleAfterDrop(J job, double time)
rescheduleAfterDrop in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The jobs that was dropped.time - The current time (i.e., drop time of the job).AbstractSimQueue.drop(J, double),
AbstractSimQueue.removeJobFromQueueUponDrop(J, double)protected final void removeJobFromQueueUponRevokation(J job, double time, boolean auto)
removeJobFromQueueUponRevokation in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job that is to be revoked.time - The current time (i.e., revocation time of the job).auto - Whether or not this applies to an auto-revocation.AbstractSimQueue.revoke(double, J, boolean),
AbstractSimQueue.autoRevoke(double, J),
AbstractSimQueue.rescheduleAfterRevokation(J, double, boolean),
SimQueue.AutoRevocationPolicyprotected final void rescheduleAfterRevokation(J job, double time, boolean auto)
rescheduleAfterRevokation in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The jobs that was successfully revoked.time - The current time (i.e., revocation time of the job).auto - Whether or not this applies to an auto-revocation.AbstractSimQueue.revoke(double, J, boolean),
AbstractSimQueue.autoRevoke(double, J),
AbstractSimQueue.removeJobFromQueueUponRevokation(J, double, boolean),
SimQueue.AutoRevocationPolicyprotected final void setServerAccessCreditsSubClass()
setServerAccessCreditsSubClass in class AbstractSimQueue<J extends SimJob,Q extends SUR>AbstractSimQueue.getServerAccessCredits(),
AbstractSimQueue.setServerAccessCredits(double, int),
AbstractSimQueue.rescheduleForNewServerAccessCredits(double)protected final void rescheduleForNewServerAccessCredits(double time)
rescheduleForNewServerAccessCredits in class AbstractSimQueue<J extends SimJob,Q extends SUR>time - The current time (i.e., the time at which new server-access credits became available).AbstractSimQueue.hasServerAcccessCredits(),
AbstractSimQueue.hasJobsInWaitingArea(),
AbstractSimQueue.start(double, J),
AbstractSimQueue.getFirstJobInWaitingArea()public final boolean isStartArmed()
true.SimQueueListener.notifyNewStartArmed(double, Q, boolean)protected final void insertJobInQueueUponStart(J job, double time)
insertJobInQueueUponStart in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job that starts.time - The current time (i.e., start time of the job).rescheduleAfterStart(J, double)protected final void rescheduleAfterStart(J job, double time)
AbstractSimQueue.getJobsInServiceArea() if it is not the only job in the service area.
Performs sanity checks on the fly.
rescheduleAfterStart in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job that started (and is already present in AbstractSimQueue.getJobsInServiceArea().time - The current time (i.e., the start time of the job).AbstractSimQueue.getNumberOfJobsInServiceArea(),
AbstractSimQueue.getFirstJobInServiceArea(),
AbstractSimQueue.depart(double, J)protected final double getServiceTimeForJob(J job)
IllegalStateException.getServiceTimeForJob in class AbstractSimQueue<J extends SimJob,Q extends SUR>job - The job, non-null.IllegalStateException - Always, as a call to this method is unexpected.protected final void removeJobFromQueueUponDeparture(J departingJob, double time)
removeJobFromQueueUponDeparture in class AbstractSimQueue<J extends SimJob,Q extends SUR>departingJob - The job that departs.time - The departure (current) time.AbstractSimQueue.depart(double, J),
AbstractSimQueue.rescheduleAfterDeparture(J, double)protected final void rescheduleAfterDeparture(J departedJob, double time)
rescheduleAfterDeparture in class AbstractSimQueue<J extends SimJob,Q extends SUR>departedJob - The departed job.time - The departure (current) time.AbstractSimQueue.depart(double, J),
AbstractSimQueue.removeJobFromQueueUponDeparture(J, double)Copyright © 2018. All rights reserved.