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