public class TaskQueue<E>
extends Object
Modifier and Type | Method and Description |
---|---|
int |
drainTo(Collection<E> collection) |
protected ReentrantLock |
getPutLock() |
protected ReentrantLock |
getTakeLock() |
boolean |
isEmpty() |
boolean |
offer(E element,
boolean[] hasWaiterMarker) |
E |
poll() |
E |
poll(long timeout,
TimeUnit timeUnit) |
int |
remainingCapacity() |
boolean |
remove(E element) |
int |
size() |
E |
take() |
public int drainTo(Collection<E> collection)
public boolean isEmpty()
public boolean offer(E element, boolean[] hasWaiterMarker)
public E poll()
public E poll(long timeout, TimeUnit timeUnit) throws InterruptedException
InterruptedException
public int remainingCapacity()
public boolean remove(E element)
public int size()
public E take() throws InterruptedException
InterruptedException
protected ReentrantLock getPutLock()
protected ReentrantLock getTakeLock()