DJ - The delegate-job type.DQ - The queue-type for delegate jobs.J - The job type.Q - The queue type for jobs.public class Tandem<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends Tandem> extends AbstractSimQueueComposite_LocalStart<DJ,DQ,J,Q>
In a tandem queue, a (delegate) job visits all sub-queues once in a predetermined sequence (as determined by the deterministic iteration order over the sub-queues).
Internally, a TandemSimQueueSelector is generated from the sub-queues supplied.
This queue uses 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.
TandemSimQueueSelector,
CTandem2AbstractSimQueueComposite.RealDelegateJobMapper<J extends SimJob,DJ extends SimJob>AbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyrealDelegateJobMappereventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Constructor and Description |
|---|
Tandem(org.javades.jsimulation.r5.SimEventList eventList,
Set<DQ> queues,
DelegateSimJobFactory delegateSimJobFactory)
Creates a tandem queue given an event list and a list of queues to put in sequence.
|
| Modifier and Type | Method and Description |
|---|---|
Tandem<DJ,DQ,J,Q> |
getCopySimQueue()
Creates a functional copy of this
SimQueue. |
protected void |
processSubQueueNotifications(List<MultiSimQueueNotificationProcessor.Notification<DJ,DQ>> notifications)
Calls super method (and made final).
|
protected void |
resetEntitySubClass()
Calls super method.
|
String |
toStringDefault()
Returns "Tandem[queue list]".
|
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, 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 Tandem(org.javades.jsimulation.r5.SimEventList eventList,
Set<DQ> queues,
DelegateSimJobFactory delegateSimJobFactory)
eventList - The event list to use.queues - The queues, an iteration over the set must return (deterministically)
the non-null queues in intended order of visit.delegateSimJobFactory - An optional factory for the delegate SimJobs.IllegalArgumentException - If the event list is null,
the queues argument is null,
or if it contains a null entry.DelegateSimJobFactory,
DefaultDelegateSimJobFactorypublic Tandem<DJ,DQ,J,Q> getCopySimQueue()
SimQueueSimQueue.
The new object has the same (concrete) type as the original, but starts without jobs and without external listeners.
Its initial state must be as if SimEntity.resetEntity() was invoked on the queue.
Note that the semantics of this method are much less strict than the Object.clone () method.
Typically, concrete classes will implement this by returning a new SimQueue object.
This way, we circumvent the problem of cloning objects with final (for good reasons) fields.
SimQueue.public String toStringDefault()
toStringDefault in interface SimEntitytoStringDefault in class AbstractSimQueue<J extends SimJob,Q extends Tandem>SimEntity.setName(java.lang.String),
Object.toString()protected void resetEntitySubClass()
resetEntitySubClass in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends Tandem>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 Tandem>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.