J - The job type.Q - The queue type for jobs.public class DefaultExampleSimJob<J extends SimJob,Q extends SimQueue> extends AbstractSimJob<J,Q>
SimJob used (as starting point) in (most of) the examples.
Each job has a public index 'n', set upon construction (n > 0).
The requested service time for the job equals its index.
This is merely to create interesting examples.
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.PreNotificationHookSimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicy| Modifier and Type | Field and Description |
|---|---|
int |
n
The index of the job, strictly positive.
|
USE_ARRAY_OPTIMIZATION| Constructor and Description |
|---|
DefaultExampleSimJob(boolean reported,
int n)
Creates a new
DefaultExampleSimJob. |
| Modifier and Type | Method and Description |
|---|---|
double |
getServiceTime(SimQueue queue)
Returns the index number as service time at given (any non-
null) queue,
unless the SimJob.getServiceTime(Q) contract orders otherwise. |
protected void |
resetEntitySubClass()
Calls super method (in order to make implementation final).
|
String |
toStringDefault()
Returns
"DefaultExampleSimJob". |
getQueue, setQueueaddPendingNotification, 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, waitdoAfterNotifications, doOperation, getEventList, getLastUpdateTime, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, registerSimEntityListener, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, unregisterSimEntityListener, updatenotifyEventListResetgetQoS, getQoSClasspublic DefaultExampleSimJob(boolean reported,
int n)
DefaultExampleSimJob.
The SimJob created is not attached to a SimEventList (i.e., it does not receive reset events
from the event list, nor does it have to; subclasses may override this).
reported - Whether or not this job reports main queue operations to System.out.n - The index of the job, strictly positive.public double getServiceTime(SimQueue queue)
null) queue,
unless the SimJob.getServiceTime(Q) contract orders otherwise.getServiceTime in interface SimJob<J extends SimJob,Q extends SimQueue>getServiceTime in class AbstractSimJob<J extends SimJob,Q extends SimQueue>queue - The queue to visit; any non-null value of the argument
returns the index number as requested service time.SimJob.getServiceTime(Q) contract.SimJob.getQueue()protected final void resetEntitySubClass()
resetEntitySubClass in class AbstractSimJob<J extends SimJob,Q extends SimQueue>SimEntity.resetEntity()public String toStringDefault()
"DefaultExampleSimJob".toStringDefault in interface SimEntitytoStringDefault in class AbstractSimEntity"DefaultExampleSimJob".SimEntity.setName(java.lang.String),
Object.toString()Copyright © 2018. All rights reserved.