public class LeakyBucket<J extends SimJob,Q extends LeakyBucket> extends DLIMIT<J,Q>
LeakyBucket queue jobs depart without service in arrival order,
but not at a higher rate than a given limit,
at the expense of waiting in a waiting area with limited capacity,
or being dropped if the waiting area is fully occupied.
This SimQueue is server-less.
Apart from having a potentially finite-sized (fixed) waiting area defined by the property bufferSize,
LeakyBucket is equal to DLIMIT.
If the buffer size is infinite (Integer.MAX_VALUE), this queueing system is equivalent to DLIMIT.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
DLIMITDLIMIT.RateLimitExpirationEvent<Q extends DLIMIT>AbstractSimEntity.Notifier, AbstractSimEntity.PreNotificationHookSimQueue.AutoRevocationPolicySimEntity.Action, SimEntity.UnknownNotificationTypePolicy, SimEntity.UnknownOperationPolicyeventsScheduled, SANITYUSE_ARRAY_OPTIMIZATION| Constructor and Description |
|---|
LeakyBucket(org.javades.jsimulation.r5.SimEventList eventList,
int bufferSize,
double rateLimit)
Creates a
LeakyBucket queue with infinite buffer size given an event list and (departure) rate limit. |
| Modifier and Type | Method and Description |
|---|---|
LeakyBucket<J,Q> |
getCopySimQueue()
Returns a new
LeakyBucket object on the same SimEventList
with the same buffer size and (departure) rate limit. |
String |
toStringDefault()
Returns "LeakyBucket[bufferSize,rateLimit]".
|
getQoS, getQoSClass, getRateLimit, insertJobInQueueUponArrival, isRateLimited, rateLimitExpiration, removeJobFromQueueUponDeparture, removeJobFromQueueUponDrop, removeJobFromQueueUponRevokation, rescheduleAfterArrival, rescheduleAfterDeparture, rescheduleAfterDrop, rescheduleAfterRevokation, resetEntitySubClass, scheduleRateLimitExpirationEventgetServiceTimeForJob, insertJobInQueueUponStart, isStartArmed, queueAccessVacationDropSubClass, rescheduleAfterStart, rescheduleForNewServerAccessCredits, setServerAccessCreditsSubClassgetBufferSize, getNumberOfServersarrive, 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 LeakyBucket(org.javades.jsimulation.r5.SimEventList eventList,
int bufferSize,
double rateLimit)
LeakyBucket queue with infinite buffer size given an event list and (departure) rate limit.eventList - The event list to use.bufferSize - The buffer size (non-negative), Integer.MAX_VALUE is interpreted as infinity.rateLimit - The (departure) rate limit, non-negative.IllegalArgumentException - If the buffer size or the rate limit is strictly negative.public LeakyBucket<J,Q> getCopySimQueue()
LeakyBucket object on the same SimEventList
with the same buffer size and (departure) rate limit.getCopySimQueue in interface SimQueue<J extends SimJob,Q extends LeakyBucket>getCopySimQueue in class DLIMIT<J extends SimJob,Q extends LeakyBucket>LeakyBucket object on the same SimEventList
with the same buffer size and (departure) rate limit.AbstractSimEntity.getEventList(),
AbstractClassicSimQueue.getBufferSize(),
DLIMIT.getRateLimit()public String toStringDefault()
toStringDefault in interface SimEntitytoStringDefault in class DLIMIT<J extends SimJob,Q extends LeakyBucket>SimEntity.setName(java.lang.String),
Object.toString()Copyright © 2018. All rights reserved.