J - The type of SimJobs supported.Q - The type of SimQueues supported.P - The type used for QoS.public final class SimQueueQoSStateHandler<J extends SimJob,Q extends SimQueueQoS,P> extends Object implements SimQueueStateHandler
SimQueueStateHandler for SimQueueQoS.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 |
|---|
SimQueueQoSStateHandler(boolean comparableQoS)
Creates a new handler.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHandlerName()
Returns "SimQueueQoSHandler".
|
Map<P,Set<J>> |
getJobsQoSMap()
Maps QoS values onto jobs present with that QoS value.
|
void |
initHandler(DefaultSimQueueState queueState)
Initializes the handler, and passes the
DefaultSimQueueState object. |
void |
resetHandler(DefaultSimQueueState queueState)
Resets the (state represented by) this handler.
|
void |
updateJobsQoSMap() |
public SimQueueQoSStateHandler(boolean comparableQoS)
Creates and maintains the mapping from QoS values onto jobs present with that QoS value.
Depending upon the parameter, a HashMap (false) or a TreeMap (true) is used.
comparableQoS - Whether the underlying QoS class to support is Comparable.getJobsQoSMap()public final String getHandlerName()
getHandlerName in interface SimQueueStateHandlerpublic final void initHandler(DefaultSimQueueState queueState)
SimQueueStateHandlerDefaultSimQueueState object.
This method is called only once during registration at the DefaultSimQueueState object.
initHandler in interface SimQueueStateHandlerqueueState - The DefaultSimQueueState at which we register, non-null.DefaultSimQueueState.registerHandler(org.javades.jqueues.r5.util.predictor.state.SimQueueStateHandler)public void resetHandler(DefaultSimQueueState queueState)
SimQueueStateHandlerresetHandler in interface SimQueueStateHandlerqueueState - The DefaultSimQueueState at which we are registered, non-null.SimQueueState.reset(),
DefaultSimQueueState.reset()public final Map<P,Set<J>> getJobsQoSMap()
Mapping is 1 to many. Empty and null sets are not allowed.
A job can be present in at most one of the value sets.
See the constructor of this handler for details about finer structuring of the map (e.g., when caller may assume
it is a NavigableMap.
public void updateJobsQoSMap()
Copyright © 2018. All rights reserved.