public class FixedPriorityBlockingQueue<T> extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
FixedPriorityBlockingQueue.PollLastHook<T> |
| 构造器和说明 |
|---|
FixedPriorityBlockingQueue(int maxSize,
Comparator<T> comparator) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
boolean |
contains(T element) |
Comparator<T> |
getComparator() |
int |
getMaxSize() |
boolean |
isEmpty() |
void |
put(T element) |
void |
regsitPollLastHook(FixedPriorityBlockingQueue.PollLastHook<T> hook)
Add a hook for this queue.
|
int |
size() |
T |
take()
Return the element with min priority.
|
T |
takeMax()
Return the element with max priority.
|
String |
toString() |
public FixedPriorityBlockingQueue(int maxSize,
Comparator<T> comparator)
public void put(T element) throws InterruptedException
public T take() throws InterruptedException
InterruptedExceptionpublic T takeMax() throws InterruptedException
InterruptedExceptionpublic void regsitPollLastHook(FixedPriorityBlockingQueue.PollLastHook<T> hook)
hook - public boolean contains(T element)
public int size()
public void clear()
public boolean isEmpty()
public Comparator<T> getComparator()
public int getMaxSize()
Copyright © 2022 The Apache Software Foundation. All rights reserved.