|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--util.PriorityProvider
An object for dynamically adjusting the priorities of object when enqueued in a FairWeightedQueue.
| Field Summary | |
int |
defaultPriority
|
int |
highestPriority
|
int |
lowestPriority
|
int |
numberOfPriorities
|
private HashMap |
priorityMappings
|
private static long |
serialVersionUID
|
private HashMap |
specifiedClasses
|
| Constructor Summary | |
PriorityProvider(int numberOfPriorities)
If no default is selected, choose the middle priority as the default |
|
PriorityProvider(int numberOfPriorities,
int defaultPriority)
|
|
| Method Summary | |
void |
decrementClassPriority(Class c)
Sets a mark so that all objects of the specified class will have one lower priority. |
boolean |
decrementPriority(Object o)
Decrements the priority of object o. |
protected int |
getHighestPriority(int i,
int j)
Returns the highest priority between the two priorities. |
protected int |
getNextHighestPriority(int priority)
Returns the next highest priority or the highest priority, if priority is currently at maximum. |
protected int |
getNextLowestPriority(int priority)
Returns the next lowest priority or the lowest priority, if priority is currently at minimum. |
int |
getNumberOfPriorities()
Returns the number of priorities currently supported. |
int |
getPriority(Object o)
For a given object o, returns the priority specified for o. |
void |
incrementClassPriority(Class c)
Sets a mark so that all objects of the specified class will have one higher priority. |
boolean |
incrementPriority(Object o)
Increments the priority of object o. |
void |
resetPriorities()
Removes all specified Priorities |
void |
resetPriority(Object o)
Removes any specified priority association. |
void |
setHighestClassPriority(Class c)
Sets a mark so that all objects of the specified class will have the highest priority. |
boolean |
setHighestPriority(Object o)
Attempts to set o to the highest priority. |
void |
setLowestClassPriority(Class c)
Sets a mark so that all objects of the specified class will have the lowest priority. |
boolean |
setLowestPriority(Object o)
Attempts to set o to the lowest priority. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
public final int highestPriority
public final int lowestPriority
public final int defaultPriority
public final int numberOfPriorities
private HashMap priorityMappings
private HashMap specifiedClasses
| Constructor Detail |
public PriorityProvider(int numberOfPriorities,
int defaultPriority)
public PriorityProvider(int numberOfPriorities)
| Method Detail |
public int getNumberOfPriorities()
public void resetPriorities()
public void resetPriority(Object o)
public boolean incrementPriority(Object o)
public boolean decrementPriority(Object o)
public boolean setHighestPriority(Object o)
public boolean setLowestPriority(Object o)
public void incrementClassPriority(Class c)
public void decrementClassPriority(Class c)
public void setHighestClassPriority(Class c)
public void setLowestClassPriority(Class c)
protected int getNextHighestPriority(int priority)
protected int getNextLowestPriority(int priority)
protected int getHighestPriority(int i,
int j)
public int getPriority(Object o)
|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||