|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ahc.collection.GenericPriorityQueue
This is the generic, configurable implementation of a PriorityQueue.
| Constructor Summary | |
GenericPriorityQueue(Store store,
boolean threadSafe)
|
|
GenericPriorityQueue(Store store,
java.util.Comparator comparator,
boolean threadSafe)
|
|
| Method Summary | |
boolean |
add(java.lang.Object obj,
java.lang.Object priority)
|
void |
clear()
|
void |
clear(java.lang.Object minPriority)
removes all elements from the queue that have a lower priority than the specified threshold. |
boolean |
isEmpty()
|
boolean |
isEmpty(java.lang.Object minPriority)
|
boolean |
isThreadSafe()
|
java.lang.Object |
peek()
This method is implemented only for non-threadsafe queues so that it does not have InterruptedException in its signature. |
java.lang.Object |
peek(boolean blocking)
|
java.lang.Object |
peek(int timeoutMillis)
|
java.lang.Object |
peek(java.lang.Object minPriority)
same as remove(), but ignores elements of a lower priority than a minimum threshold. |
java.lang.Object |
peek(java.lang.Object minPriority,
boolean blocking)
|
java.lang.Object |
peek(java.lang.Object minPriority,
int timeoutMillis)
|
java.lang.Object |
remove()
This method is implemented only for non-threadsafe queues so that it does not have InterruptedException in its signature. |
java.lang.Object |
remove(boolean blocking)
|
java.lang.Object |
remove(int timeoutMillis)
|
java.lang.Object |
remove(java.lang.Object minPriority)
same as remove(), but ignores elements of a lower priority than a minimum threshold. |
java.lang.Object |
remove(java.lang.Object minPriority,
boolean blocking)
|
java.lang.Object |
remove(java.lang.Object minPriority,
int timeoutMillis)
|
void |
setAcceptanceThreshold(java.lang.Object o)
Tells the queue to discard elements that have a lower priority than o. |
int |
size()
|
int |
size(java.lang.Object minPriority)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GenericPriorityQueue(Store store,
boolean threadSafe)
public GenericPriorityQueue(Store store,
java.util.Comparator comparator,
boolean threadSafe)
| Method Detail |
public boolean add(java.lang.Object obj,
java.lang.Object priority)
add in interface PriorityQueuepublic java.lang.Object remove()
PriorityQueue
remove in interface PriorityQueue
public java.lang.Object remove(boolean blocking)
throws java.lang.InterruptedException
remove in interface PriorityQueuejava.lang.InterruptedException
public java.lang.Object remove(int timeoutMillis)
throws java.lang.InterruptedException,
TimeoutException
remove in interface PriorityQueuejava.lang.InterruptedException
TimeoutExceptionpublic java.lang.Object remove(java.lang.Object minPriority)
PriorityQueue
remove in interface PriorityQueue
public java.lang.Object remove(java.lang.Object minPriority,
boolean blocking)
throws java.lang.InterruptedException
remove in interface PriorityQueuejava.lang.InterruptedException
public java.lang.Object remove(java.lang.Object minPriority,
int timeoutMillis)
throws java.lang.InterruptedException,
TimeoutException
remove in interface PriorityQueuejava.lang.InterruptedException
TimeoutExceptionpublic java.lang.Object peek()
PriorityQueue
peek in interface PriorityQueue
public java.lang.Object peek(boolean blocking)
throws java.lang.InterruptedException
peek in interface PriorityQueuejava.lang.InterruptedException
public java.lang.Object peek(int timeoutMillis)
throws java.lang.InterruptedException,
TimeoutException
peek in interface PriorityQueuejava.lang.InterruptedException
TimeoutExceptionpublic java.lang.Object peek(java.lang.Object minPriority)
PriorityQueue
peek in interface PriorityQueue
public java.lang.Object peek(java.lang.Object minPriority,
boolean blocking)
throws java.lang.InterruptedException
peek in interface PriorityQueuejava.lang.InterruptedException
public java.lang.Object peek(java.lang.Object minPriority,
int timeoutMillis)
throws java.lang.InterruptedException,
TimeoutException
peek in interface PriorityQueuejava.lang.InterruptedException
TimeoutExceptionpublic int size()
size in interface PriorityQueuepublic int size(java.lang.Object minPriority)
size in interface PriorityQueuepublic boolean isEmpty()
isEmpty in interface PriorityQueuepublic boolean isEmpty(java.lang.Object minPriority)
isEmpty in interface PriorityQueuepublic void clear()
clear in interface PriorityQueuepublic void clear(java.lang.Object minPriority)
PriorityQueue
clear in interface PriorityQueuepublic void setAcceptanceThreshold(java.lang.Object o)
PriorityQueue
setAcceptanceThreshold in interface PriorityQueuepublic boolean isThreadSafe()
isThreadSafe in interface PriorityQueue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||