DJ - The delegate-job type.DQ - The queue-type for delegate jobs.J - The job type.Q - The queue type for jobs.public abstract class AbstractFeedbackSimQueue<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractFeedbackSimQueue> extends AbstractSimQueueComposite_LocalStart<DJ,DQ,J,Q>
Under the hood, a delegate job for each SimJob visits the (single) embedded SimQueue,
and upon departing from that queue, the delegate job is optionally fed back to the embedded queue's input.
Feedback is controlled through a SimQueueFeedbackController, allowing maximum flexibility.
The feedback controller is passed upon construction and cannot be changed afterwards.
An internal FeedbackSimQueueSelector is used as SimQueueSelector for the super class.
After the delegate job departs the embedded queue and is not fed back, the "real" job departs
from the AbstractFeedbackSimQueue.
This and derived queues use the LocalStart model as explained with AbstractSimQueueComposite_LocalStart.
They do, however, inherit their QoS structure from the embedded queue.
(This cannot be overruled in subclasses.)
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
AbstractSimQueueComposite.RealDelegateJobMapper<J extends SimJob,DJ extends SimJob>AbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyrealDelegateJobMappereventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFeedbackSimQueue(org.javades.jsimulation.r5.SimEventList eventList,
DQ queue,
SimQueueFeedbackController<J,DQ> feedbackController,
DelegateSimJobFactory delegateSimJobFactory)
Creates an (abstract) feedback queue given an event list, a queue and a feedback controller.
|
| Modifier and Type | Method and Description |
|---|---|
SimQueue<DJ,DQ> |
getEncapsulatedQueue()
Returns the encapsulated queue.
|
SimQueueFeedbackController<J,DQ> |
getFeedbackController()
Returns the feedback controller.
|
Object |
getQoS()
Returns the QoS value of the encapsulated queue.
|
Class |
getQoSClass()
Returns the QoS class of the encapsulated queue.
|
protected void |
processSubQueueNotifications(List<MultiSimQueueNotificationProcessor.Notification<DJ,DQ>> notifications)
Calls super method (and made final).
|
protected void |
resetEntitySubClass()
Calls super method.
|
getServiceTimeForJob, insertJobInQueueUponArrival, insertJobInQueueUponStart, isStartArmed, queueAccessVacationDropSubClass, removeJobFromQueueUponDeparture, removeJobFromQueueUponDrop, removeJobFromQueueUponRevokation, rescheduleAfterArrival, rescheduleAfterDeparture, rescheduleAfterDrop, rescheduleAfterRevokation, rescheduleAfterStart, rescheduleForNewServerAccessCredits, setServerAccessCreditsSubClassaddRealJobLocal, getCopySimQueues, getCopySubSimQueues, getDelegateJob, getDelegateJobMild, getDelegateSimJobFactory, getIndex, getIndex, getQueue, getQueue, getQueues, getRealJob, getRealJob, getSimQueueSelector, isDelegateJob, isRealJob, notifyResetEntity, notifyStateChanged, notifyUpdate, removeJobsFromQueueLocal, resetSimQueueSelector, selectFirstQueue, selectNextQueue, setDelegateSimJobFactoryarrive, 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, 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, waitarrive, getAutoRevocationPolicy, getCopySimQueue, 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, toStringDefault, unregisterSimEntityListener, updateprotected AbstractFeedbackSimQueue(org.javades.jsimulation.r5.SimEventList eventList,
DQ queue,
SimQueueFeedbackController<J,DQ> feedbackController,
DelegateSimJobFactory delegateSimJobFactory)
eventList - The event list to use.queue - The queue, non-null.feedbackController - The feedback controller, non-null.delegateSimJobFactory - An optional factory for the delegate SimJobs.IllegalArgumentException - If the event list, queue or feedback controller is null.DelegateSimJobFactory,
DefaultDelegateSimJobFactorypublic final SimQueue<DJ,DQ> getEncapsulatedQueue()
null.public final SimQueueFeedbackController<J,DQ> getFeedbackController()
null.public final Object getQoS()
getQoS in interface SimQoS<J extends SimJob,Q extends AbstractFeedbackSimQueue>getQoS in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractFeedbackSimQueue>public final Class getQoSClass()
getQoSClass in interface SimQoS<J extends SimJob,Q extends AbstractFeedbackSimQueue>getQoSClass in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractFeedbackSimQueue>protected void resetEntitySubClass()
Note that the SimQueueSelector of this composite queue is reset by our super class.
In turn, the selector will reset the embedded SimQueueFeedbackController.
resetEntitySubClass in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractFeedbackSimQueue>AbstractSimQueueComposite_LocalStart.removeJobFromQueueUponRevokation(J, double, boolean),
AbstractSimQueueComposite_LocalStart.rescheduleAfterRevokation(J, double, boolean),
SimEntity.resetEntity()protected final void processSubQueueNotifications(List<MultiSimQueueNotificationProcessor.Notification<DJ,DQ>> notifications)
processSubQueueNotifications in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractFeedbackSimQueue>notifications - The sub-queue notifications, will be modified; empty upon return.MultiSimQueueNotificationProcessor,
MultiSimQueueNotificationProcessor.Processor,
MultiSimQueueNotificationProcessor.setProcessor(org.javades.jqueues.r5.listener.MultiSimQueueNotificationProcessor.Processor),
SimEntitySimpleEventType.RESET,
SimJQSimpleEventType.ARRIVAL,
SimQueueSimpleEventType.QUEUE_ACCESS_VACATION,
SimQueueSimpleEventType.QAV_START,
SimQueueSimpleEventType.QAV_END,
SimQueueSimpleEventType.SERVER_ACCESS_CREDITS,
SimQueueSimpleEventType.OUT_OF_SAC,
SimQueueSimpleEventType.REGAINED_SAC,
SimQueueSimpleEventType.STA_FALSE,
SimQueueSimpleEventType.STA_TRUE,
SimJQSimpleEventType.DROP,
SimJQSimpleEventType.REVOCATION,
SimJQSimpleEventType.AUTO_REVOCATION,
SimJQSimpleEventType.START,
SimJQSimpleEventType.DEPARTURE,
AbstractSimEntity.addPendingNotification(java.util.Map<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member, org.javades.jqueues.r5.entity.SimEntityEvent>),
SimQueue.arrive(double, J),
AbstractSimQueue.start(double, J),
AbstractSimQueueComposite.selectNextQueue(double, J, DQ),
AbstractSimQueue.depart(double, J),
AbstractSimQueue.triggerPotentialNewStartArmed(double),
AbstractSimEntity.clearAndUnlockPendingNotificationsIfLocked(),
AbstractSimEntity.fireAndLockPendingNotifications()Copyright © 2018. All rights reserved.