DJ - The delegate-job type.DQ - The queue-type for delegate jobs.J - The job type.Q - The queue type for jobs.public class Pattern<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends Pattern> extends AbstractParallelSimQueues<DJ,DQ,J,Q>
Jobs are assigned a sub-queue according to a fixed (repeated) selection pattern.
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.
AbstractSimQueueComposite.RealDelegateJobMapper<J extends SimJob,DJ extends SimJob>AbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyrealDelegateJobMappereventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Constructor and Description |
|---|
Pattern(org.javades.jsimulation.r5.SimEventList eventList,
Set<DQ> queues,
DelegateSimJobFactory delegateSimJobFactory,
int[] pattern)
Creates a parallel queueing system with pattern selection policy.
|
| Modifier and Type | Method and Description |
|---|---|
Pattern<DJ,DQ,J,Q> |
getCopySimQueue()
Returns a new
Pattern object on the same SimEventList with copies of the sub-queues,
the same pattern, and the same delegate-job factory. |
int[] |
getPattern()
Returns the pattern associated with this queue.
|
protected void |
resetEntitySubClass()
Calls super method (in order to make implementation final).
|
String |
toStringDefault()
Returns "Pattern[queue list]".
|
processSubQueueNotificationsgetQoS, 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 Pattern(org.javades.jsimulation.r5.SimEventList eventList,
Set<DQ> queues,
DelegateSimJobFactory delegateSimJobFactory,
int[] pattern)
eventList - The event list to use.queues - The queues (with deterministic iteration order).delegateSimJobFactory - An optional factory for the delegate SimJobs.pattern - The queue-selection pattern; if null or empty,
or if the current value in the pattern for a job is out-of-range,
the job departs upon arrival (in fact, upon start).IllegalArgumentException - If the event list is null,
the queues argument is null,
or if it contains a null entry.DelegateSimJobFactory,
DefaultDelegateSimJobFactory,
SimQueueSelectorpublic Pattern<DJ,DQ,J,Q> getCopySimQueue()
Pattern object on the same SimEventList with copies of the sub-queues,
the same pattern, and the same delegate-job factory.Pattern object on the same SimEventList with copies of the sub-queues,
the same pattern, and the same delegate-job factory.UnsupportedOperationException - If the encapsulated queues could not be copied through SimQueue.getCopySimQueue().AbstractSimEntity.getEventList(),
AbstractSimQueueComposite.getCopySubSimQueues(),
AbstractSimQueueComposite.getDelegateSimJobFactory(),
getPattern()public String toStringDefault()
toStringDefault in interface SimEntitytoStringDefault in class AbstractSimQueue<J extends SimJob,Q extends Pattern>SimEntity.setName(java.lang.String),
Object.toString()public final int[] getPattern()
For non-null patterns, an array copy of the internally held pattern is returned.
null or empty.protected final void resetEntitySubClass()
Note: Resetting the selection pattern is done in the SimQueueSelector,
which is automatically reset by our super class.
resetEntitySubClass in class AbstractSimQueueComposite_LocalStart<DJ extends AbstractSimJob,DQ extends SimQueue,J extends SimJob,Q extends Pattern>AbstractSimQueueComposite_LocalStart.removeJobFromQueueUponRevokation(J, double, boolean),
AbstractSimQueueComposite_LocalStart.rescheduleAfterRevokation(J, double, boolean),
SimEntity.resetEntity()Copyright © 2018. All rights reserved.