public class SimQueueServerAccessCreditsAvailabilityLogger extends DefaultSimQueueListener
SimQueueListener that logs server-access-credits availability in between resets.Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimEntity.resetEntity(),
SimQueue.setServerAccessCredits(double, int),
SimEntityListener.notifyResetEntity(org.javades.jqueues.r5.entity.SimEntity),
SimQueueListener.notifyOutOfServerAccessCredits(double, Q),
SimQueueListener.notifyRegainedServerAccessCredits(double, Q)| Constructor and Description |
|---|
SimQueueServerAccessCreditsAvailabilityLogger() |
| Modifier and Type | Method and Description |
|---|---|
List<Map<Double,Boolean>> |
getServerAccessCreditsAvailabilityLog()
Returns the server-access-credits availability log (unmodifiable).
|
static boolean |
matchServerAccessCreditsAvailabilityLogs(List<Map<Double,Boolean>> predictedSacLogs,
List<Map<Double,Boolean>> actualSacLogs,
double accuracy,
String testString)
Compares two server-access-credits availability logs (predicted and actual), and reports inequalities to
System.err. |
void |
notifyOutOfServerAccessCredits(double time,
SimQueue queue)
Does nothing.
|
void |
notifyRegainedServerAccessCredits(double time,
SimQueue queue)
Does nothing.
|
void |
notifyResetEntity(SimEntity entity)
Does nothing.
|
notifyNewStartArmed, notifyStartQueueAccessVacation, notifyStopQueueAccessVacationnotifyArrival, notifyAutoRevocation, notifyDeparture, notifyDrop, notifyRevocation, notifyStartnotifyStateChanged, notifyUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyArrival, notifyAutoRevocation, notifyDeparture, notifyDrop, notifyRevocation, notifyStartnotifyStateChanged, notifyUpdatepublic SimQueueServerAccessCreditsAvailabilityLogger()
public final List<Map<Double,Boolean>> getServerAccessCreditsAvailabilityLog()
The log is constructed as a list of non-null and unique single-entry maps, corresponding to a reported state change in server-access-credits availability. The entry holds the time as its key and the new state of the server-access-credits availability as its value.
The server-access-credits availability log is automatically cleared upon a (reported) queue reset.
SimEntityListener.notifyResetEntity(org.javades.jqueues.r5.entity.SimEntity)public void notifyResetEntity(SimEntity entity)
DefaultSimEntityListenernotifyResetEntity in interface SimEntityListenernotifyResetEntity in class DefaultSimEntityListenerentity - The entity that has been reset.public void notifyRegainedServerAccessCredits(double time,
SimQueue queue)
DefaultSimQueueListenernotifyRegainedServerAccessCredits in interface SimQueueListenernotifyRegainedServerAccessCredits in class DefaultSimQueueListenertime - The (current) time.queue - The queue.public void notifyOutOfServerAccessCredits(double time,
SimQueue queue)
DefaultSimQueueListenernotifyOutOfServerAccessCredits in interface SimQueueListenernotifyOutOfServerAccessCredits in class DefaultSimQueueListenertime - The (current) time.queue - The queue.SimQueue.setServerAccessCredits(double, int)public static boolean matchServerAccessCreditsAvailabilityLogs(List<Map<Double,Boolean>> predictedSacLogs, List<Map<Double,Boolean>> actualSacLogs, double accuracy, String testString)
System.err.predictedSacLogs - The predicted server-access-credits availability logs.actualSacLogs - The actual server-access-credits availability logs.accuracy - The allowed deviation in key values (times-of-change).testString - An optional String identifying the test in place.true if the two logs match.IllegalArgumentException - If an argument is null or improperly structured.Copyright © 2018. All rights reserved.