J - The type of SimJobs supported.Q - The type of SimQueues supported.P - The type used for QoS.public abstract class AbstractPreemptiveSimQueueQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS,P extends Comparable> extends AbstractPreemptiveSimQueue<J,Q> implements SimQueueQoS<J,Q,P>
This class extends from AbstractPreemptiveSimQueue for preemption support, but
would also want to inherit from (the rather small) AbstractSimQueueQoS.
Hence, some code duplication is present.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
AbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyDEFAULT_PREEMPTION_STRATEGY, jobsBeingServed, remainingServiceTime, TOLERANCE_RSTeventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPreemptiveSimQueueQoS(org.javades.jsimulation.r5.SimEventList eventList,
int bufferSize,
int numberOfServers,
PreemptionStrategy preemptionStrategy,
Class<P> qosClass,
P defaultJobQoS)
Creates a non-preemptive queue with given buffer size and number of servers, with explicit QoS support given an event list.
|
| Modifier and Type | Method and Description |
|---|---|
P |
getDefaultJobQoS()
Gets the default QoS value used by this queue for jobs that have
null QoS value. |
P |
getQoS()
Returns
null, since the QoS value of a queue has no meaning. |
Class<? extends P> |
getQoSClass()
Overridden in order to restrict the return type.
|
protected void |
resetEntitySubClass()
Calls super method.
|
void |
setQoS(P qos)
Calls super method on
SimQueueQoS (in order to make implementation final). |
void |
setQoSClass(Class<? extends P> qosClass)
Calls super method (in order to make implementation final).
|
getJobsBeingServed, getPreemptionStrategy, preemptJob, queueAccessVacationDropSubClass, removeJobFromQueueUponDeparture, removeJobFromQueueUponDrop, removeJobFromQueueUponExit, removeJobFromQueueUponRevokation, rescheduleAfterDeparture, rescheduleAfterDrop, rescheduleAfterExit, rescheduleAfterRevokation, startServiceChunk, updateRemainingServiceTimegetBufferSize, getNumberOfServersarrive, autoRevoke, cancelDepartureEvent, cancelDepartureEvent, depart, departureFromEventList, drop, getAutoRevocationPolicy, getDepartureEvents, getDepartureEvents, getFirstJob, getFirstJobInServiceArea, getFirstJobInWaitingArea, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, getServiceTimeForJob, hasJobs, hasJobsInServiceArea, hasJobsInWaitingArea, hasServerAcccessCredits, insertJobInQueueUponArrival, insertJobInQueueUponStart, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, registerStdOutSimQueueListener, rescheduleAfterArrival, rescheduleAfterStart, rescheduleForNewServerAccessCredits, revoke, revoke, scheduleDepartureEvent, scheduleJobArrival, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCredits, setServerAccessCreditsSubClass, start, takeServerAccessCredit, toStringDefault, 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, waitgetCopySimQueue, getJobsQoSMaparrive, getAutoRevocationPolicy, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, isStartArmed, revoke, revoke, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCreditsdoAfterNotifications, doOperation, getEventList, getLastUpdateTime, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, registerSimEntityListener, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, toStringDefault, unregisterSimEntityListener, updateprotected AbstractPreemptiveSimQueueQoS(org.javades.jsimulation.r5.SimEventList eventList,
int bufferSize,
int numberOfServers,
PreemptionStrategy preemptionStrategy,
Class<P> qosClass,
P defaultJobQoS)
eventList - The event list to use.bufferSize - The buffer size (non-negative), Integer.MAX_VALUE is interpreted as infinity.numberOfServers - The number of servers (non-negative), Integer.MAX_VALUE is interpreted as infinity.preemptionStrategy - The preemption strategy, if null, the default is used (preemptive-resume).qosClass - The Java class to use for QoS behavior, non-null.defaultJobQoS - The default QoS value to use for non-QoS jobs, non-null.IllegalArgumentException - If the event list or one or both of the QoS arguments is null.public final Class<? extends P> getQoSClass()
SimQueueOrJobQoS
If the SimEntity does not support QoS, null should be returned.
The default implementation returns null.
getQoSClass in interface SimQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS>getQoSClass in interface SimQueueOrJobQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS,P extends Comparable>null.public final void setQoSClass(Class<? extends P> qosClass)
setQoSClass in interface SimQueueOrJobQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS,P extends Comparable>qosClass - The new Java class used for QoS behavior, may be null.public final P getQoS()
null, since the QoS value of a queue has no meaning.getQoS in interface SimQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS>getQoS in interface SimQueueOrJobQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS,P extends Comparable>null.public final void setQoS(P qos)
SimQueueQoS (in order to make implementation final).setQoS in interface SimQueueOrJobQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS,P extends Comparable>qos - The new QoS value, may be null.public final P getDefaultJobQoS()
SimQueueQoSnull QoS value.getDefaultJobQoS in interface SimQueueQoS<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS,P extends Comparable>null QoS value.SimQoS.getQoS()protected void resetEntitySubClass()
resetEntitySubClass in class AbstractPreemptiveSimQueue<J extends SimJob,Q extends AbstractPreemptiveSimQueueQoS>AbstractPreemptiveSimQueue.remainingServiceTime,
AbstractPreemptiveSimQueue.jobsBeingServedCopyright © 2018. All rights reserved.