com.liferay.portal.kernel.concurrent
Class TaskQueue<E>
java.lang.Object
com.liferay.portal.kernel.concurrent.TaskQueue<E>
public class TaskQueue<E>
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TaskQueue
public TaskQueue()
TaskQueue
public TaskQueue(int capacity)
drainTo
public int drainTo(Collection<E> collection)
isEmpty
public boolean isEmpty()
offer
public boolean offer(E element,
boolean[] hasWaiterMarker)
poll
public E poll()
poll
public E poll(long timeout,
TimeUnit timeUnit)
throws InterruptedException
- Throws:
InterruptedException
remainingCapacity
public int remainingCapacity()
remove
public boolean remove(E element)
size
public int size()
take
public E take()
throws InterruptedException
- Throws:
InterruptedException
getPutLock
protected ReentrantLock getPutLock()
getTakeLock
protected ReentrantLock getTakeLock()