com.liferay.portal.kernel.concurrent
Class TaskQueue<E>
java.lang.Object
com.liferay.portal.kernel.concurrent.TaskQueue<E>
public class TaskQueue<E>
- extends java.lang.Object
- Author:
- Shuyang Zhou
| 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(java.util.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,
java.util.concurrent.TimeUnit timeUnit)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
remainingCapacity
public int remainingCapacity()
remove
public boolean remove(E element)
size
public int size()
take
public E take()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
getPutLock
protected java.util.concurrent.locks.ReentrantLock getPutLock()
getTakeLock
protected java.util.concurrent.locks.ReentrantLock getTakeLock()