public interface SimQueueWithGate<J extends SimJob,Q extends SimQueueWithGate> extends SimQueue<J,Q>
SimQueue with the notion of a single gate
that can be opened (optionally for a limited number of passages) and closed.
Typically, but not necessarily, used to let SimJobs pass when the gate is open,
and let them wait while the gate is closed.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
GATESimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicy| Modifier and Type | Method and Description |
|---|---|
int |
getGatePassageCredits()
Returns the number of (remaining) gate-passage credits.
|
void |
setGatePassageCredits(double time,
int gatePassageCredits)
Sets (overwrites) the (remaining) gate-passage credits.
|
arrive, getAutoRevocationPolicy, getCopySimQueue, getJobs, getJobsInServiceArea, getJobsInWaitingArea, getNumberOfJobs, getNumberOfJobsInServiceArea, getNumberOfJobsInWaitingArea, getServerAccessCredits, isJob, isJobInServiceArea, isJobInWaitingArea, isQueueAccessVacation, isStartArmed, revoke, revoke, setAutoRevocationPolicy, setQueueAccessVacation, setServerAccessCreditsdoAfterNotifications, doOperation, getEventList, getLastUpdateTime, getRegisteredNotificationTypes, getRegisteredOperations, getSimEntityListeners, getUnknownNotificationTypePolicy, getUnknownOperationPolicy, isIgnoreEventListReset, registerSimEntityListener, resetEntity, setIgnoreEventListReset, setName, setUnknownNotificationTypePolicy, setUnknownOperationPolicy, toStringDefault, unregisterSimEntityListener, updatenotifyEventListResetgetQoS, getQoSClassint getGatePassageCredits()
void setGatePassageCredits(double time,
int gatePassageCredits)
Note that setting the remaining number of passage credits to zero effectively closes the gate,
and setting it to Integer.MAX_VALUE (treated as infinity) opens it without limits on the number of passages.
If a SimQueueWithGate does not support this operation, it is to consider every strictly positive value
as Integer.MAX_VALUE, effectively opening the gate without limits on the number of passages.
time - The current time.gatePassageCredits - The remaining number of passages to allow (will override, not add to, any previous value),
with Integer.MAX_VALUE treated as infinity.IllegalArgumentException - If the number of passages passed is strictly negative.Copyright © 2018. All rights reserved.