public class ConcurrentLinkedBlockingQueue<T>
extends java.util.concurrent.ConcurrentLinkedQueue<T>
implements java.util.concurrent.BlockingQueue<T>
构造器和说明 |
---|
ConcurrentLinkedBlockingQueue(int capacity) |
限定符和类型 | 方法和说明 |
---|---|
int |
drainTo(java.util.Collection<? super T> c) |
int |
drainTo(java.util.Collection<? super T> c,
int maxElements) |
boolean |
offer(T t)
Drops elements if capacity has been reached.
|
boolean |
offer(T t,
long timeout,
java.util.concurrent.TimeUnit unit) |
T |
poll() |
T |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
put(T t) |
int |
remainingCapacity() |
boolean |
remove(java.lang.Object o) |
T |
take() |
add, addAll, contains, isEmpty, iterator, peek, size, toArray, toArray
public boolean offer(T t)
public T take() throws java.lang.InterruptedException
take
在接口中 java.util.concurrent.BlockingQueue<T>
java.lang.InterruptedException
public T poll()
public T poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
poll
在接口中 java.util.concurrent.BlockingQueue<T>
java.lang.InterruptedException
public boolean remove(java.lang.Object o)
public int remainingCapacity()
remainingCapacity
在接口中 java.util.concurrent.BlockingQueue<T>
public int drainTo(java.util.Collection<? super T> c)
drainTo
在接口中 java.util.concurrent.BlockingQueue<T>
public void put(T t) throws java.lang.InterruptedException
put
在接口中 java.util.concurrent.BlockingQueue<T>
java.lang.InterruptedException
public boolean offer(T t, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
offer
在接口中 java.util.concurrent.BlockingQueue<T>
java.lang.InterruptedException