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 AbstractCollectorSimQueue<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractCollectorSimQueue> extends AbstractSimQueueComposite_LocalStart<DJ,DQ,J,Q>
The main and collector arguments may be equal.
This and derived queues use the LocalStart model as explained with AbstractSimQueueComposite_LocalStart.
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| Constructor and Description |
|---|
AbstractCollectorSimQueue(org.javades.jsimulation.r5.SimEventList eventList,
SimQueue<DJ,DQ> mainQueue,
SimQueue<DJ,DQ> collectorQueue,
boolean collectDrops,
boolean collectAutoRevocations,
boolean collectDepartures,
DelegateSimJobFactory delegateSimJobFactory)
Creates a collector queue given an event list, a main queue and a collector queue.
|
| Modifier and Type | Method and Description |
|---|---|
protected DQ |
getCollectorQueue()
Returns the collector (second, last) queue.
|
protected DQ |
getMainQueue()
Returns the main (first) queue.
|
boolean |
isCollectAutoRevocations()
Return whether to collect auto-revocations.
|
boolean |
isCollectDepartures()
Return whether to collect departures.
|
boolean |
isCollectDrops()
Return whether to collect drops.
|
protected void |
processSubQueueNotifications(List<MultiSimQueueNotificationProcessor.Notification<DJ,DQ>> notifications)
Removes applicable exit notifications from the main queue, and let the jobs arrive at the collector queue;
invoke super method for all other notifications.
|
protected void |
resetEntitySubClass()
Calls super method (in order to make implementation final).
|
getQoS, getQoSClass, 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, updatepublic AbstractCollectorSimQueue(org.javades.jsimulation.r5.SimEventList eventList,
SimQueue<DJ,DQ> mainQueue,
SimQueue<DJ,DQ> collectorQueue,
boolean collectDrops,
boolean collectAutoRevocations,
boolean collectDepartures,
DelegateSimJobFactory delegateSimJobFactory)
Note that the mainQueue and the dropQueue arguments may be equal!
eventList - The event list to use.mainQueue - The main queue.collectorQueue - The collector queue.collectDrops - Whether to collect drops from the main queue.collectAutoRevocations - Whether to collect auto-revocations from the main queue.collectDepartures - Whether to collect departures from the main queue.delegateSimJobFactory - An optional factory for the delegate SimJobs.IllegalArgumentException - If the event list is null,
one of or both queues are null.CollectorSimQueueSelector,
DelegateSimJobFactory,
DefaultDelegateSimJobFactoryprotected final DQ getMainQueue()
protected final DQ getCollectorQueue()
public final boolean isCollectDrops()
public final boolean isCollectAutoRevocations()
public final boolean isCollectDepartures()
protected final void resetEntitySubClass()
resetEntitySubClass in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends AbstractCollectorSimQueue>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 AbstractCollectorSimQueue>notifications - The sub-queue notifications, will be modified; empty upon return.collectDrops,
collectAutoRevocations,
collectDepartures,
SimQueue.arrive(double, J)Copyright © 2018. All rights reserved.