public final class SimQueueWithGateWorkloadScheduleHandler extends Object implements WorkloadScheduleHandler
WorkloadScheduleHandler for a SimQueueWithGate.
Scans for and takes responsibility for (all) SimQueueGateEvent type(s) at registration,
and registers the SimQueueWithGateSimpleEventType simple event type(s).
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
| Constructor and Description |
|---|
SimQueueWithGateWorkloadScheduleHandler() |
| Modifier and Type | Method and Description |
|---|---|
Map<Class<? extends SimJQEvent>,SimEntitySimpleEventType.Member> |
getEventMap()
Gets the set of
SimJQEvents of this handler, and the SimEntitySimpleEventType members onto which they
map. |
NavigableMap<Double,List<Integer>> |
getGatePassageCreditsMap(SimQueue queue)
Returns the gate-passage-credits settings in time for a specific queue.
|
String |
getHandlerName()
Returns "SimQueueWithGateHandler".
|
boolean |
needsScan()
Returns
true. |
Set<SimJQEvent> |
scan(DefaultWorkloadSchedule workloadSchedule)
Scans the host
DefaultWorkloadSchedule and builds internal data structures. |
public SimQueueWithGateWorkloadScheduleHandler()
public final String getHandlerName()
getHandlerName in interface WorkloadScheduleHandlerpublic final Map<Class<? extends SimJQEvent>,SimEntitySimpleEventType.Member> getEventMap()
WorkloadScheduleHandlerSimJQEvents of this handler, and the SimEntitySimpleEventType members onto which they
map.
The key-set should contains unique SimJQEvents within the realm of the DefaultWorkloadSchedule
at which this handler registers.
Likewise, the values should be unique.
getEventMap in interface WorkloadScheduleHandlerSimJQEvents of this handler, and the SimEntitySimpleEventType members onto which they
map.SimQueueGateEvent,
SimQueueWithGateSimpleEventTypepublic final boolean needsScan()
true.public final Set<SimJQEvent> scan(DefaultWorkloadSchedule workloadSchedule) throws WorkloadScheduleException
WorkloadScheduleHandlerDefaultWorkloadSchedule and builds internal data structures.
Called by our host DefaultWorkloadSchedule only upon registration,
and if we ask for it WorkloadScheduleHandler.needsScan().
scan in interface WorkloadScheduleHandlerworkloadSchedule - The host at which we registered.SimJQEvents processed by this handler,
in a set with no particular member ordering; may be null or empty.WorkloadScheduleException - If the workload is invalid or ambiguous.DefaultWorkloadSchedule.registerHandler(org.javades.jqueues.r5.util.predictor.workload.WorkloadScheduleHandler),
WorkloadScheduleHandler.scan(org.javades.jqueues.r5.util.predictor.workload.DefaultWorkloadSchedule)public final NavigableMap<Double,List<Integer>> getGatePassageCreditsMap(SimQueue queue)
A unmodifiable view must be returned.
queue - The queue, may be null, unknown or or not in DefaultWorkloadSchedule.getQueues()
on the schedule we registered at,
in which case an empty map is returned.IllegalStateException - If we are not registered at a DefaultWorkloadSchedule.Copyright © 2018. All rights reserved.