public class SimQueueAccessVacationLogger extends DefaultSimQueueListener
SimQueueListener that logs queue-access vacations 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.setQueueAccessVacation(double, boolean),
SimEntityListener.notifyResetEntity(org.javades.jqueues.r5.entity.SimEntity),
SimQueueListener.notifyStartQueueAccessVacation(double, Q),
SimQueueListener.notifyStopQueueAccessVacation(double, Q)| Constructor and Description |
|---|
SimQueueAccessVacationLogger() |
| Modifier and Type | Method and Description |
|---|---|
List<Map<Double,Boolean>> |
getQueueAccessVacationLog()
Returns the queue-access vacation log (unmodifiable).
|
static boolean |
matchQueueAccessVacationLogs(List<Map<Double,Boolean>> predictedQavLogs,
List<Map<Double,Boolean>> actualQavLogs,
double accuracy,
String testString)
Compares two queue-access-vacation logs (predicted and actual), and reports inequalities to
System.err. |
void |
notifyResetEntity(SimEntity entity)
Does nothing.
|
void |
notifyStartQueueAccessVacation(double time,
SimQueue queue)
Does nothing.
|
void |
notifyStopQueueAccessVacation(double time,
SimQueue queue)
Does nothing.
|
notifyNewStartArmed, notifyOutOfServerAccessCredits, notifyRegainedServerAccessCreditsnotifyArrival, notifyAutoRevocation, notifyDeparture, notifyDrop, notifyRevocation, notifyStartnotifyStateChanged, notifyUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyArrival, notifyAutoRevocation, notifyDeparture, notifyDrop, notifyRevocation, notifyStartnotifyStateChanged, notifyUpdatepublic final List<Map<Double,Boolean>> getQueueAccessVacationLog()
The log is constructed as a list of non-null and unique single-entry maps, corresponding to a reported state change in queue-access vacation. The entry holds the time as its key and the new state of the queue-access vacation as its value.
The queue-access vacation 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 notifyStartQueueAccessVacation(double time,
SimQueue queue)
DefaultSimQueueListenernotifyStartQueueAccessVacation in interface SimQueueListenernotifyStartQueueAccessVacation in class DefaultSimQueueListenertime - The (current) time.queue - The queue.SimQueue.setQueueAccessVacation(double, boolean)public void notifyStopQueueAccessVacation(double time,
SimQueue queue)
DefaultSimQueueListenernotifyStopQueueAccessVacation in interface SimQueueListenernotifyStopQueueAccessVacation in class DefaultSimQueueListenertime - The (current) time.queue - The queue.SimQueue.setQueueAccessVacation(double, boolean)public static boolean matchQueueAccessVacationLogs(List<Map<Double,Boolean>> predictedQavLogs, List<Map<Double,Boolean>> actualQavLogs, double accuracy, String testString)
System.err.predictedQavLogs - The predicted queue-access-vacation logs.actualQavLogs - The actual queue-access-vacation 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.