de.tub.citydb.api.concurrent
Class WorkerPool.WorkQueue<E>
java.lang.Object
de.tub.citydb.api.concurrent.WorkerPool.WorkQueue<E>
- Enclosing class:
- WorkerPool<T>
public static final class WorkerPool.WorkQueue<E>
- extends java.lang.Object
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WorkerPool.WorkQueue
public WorkerPool.WorkQueue(int capacity)
WorkerPool.WorkQueue
public WorkerPool.WorkQueue(int capacity,
boolean fair)
offer
public boolean offer(E work)
offer
public boolean offer(E work,
long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
put
public void put(E work)
poll
public E poll()
poll
public E poll(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
take
public E take()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
peek
public E peek()
remove
public boolean remove(E work)
size
public int size()
remainingCapacity
public int remainingCapacity()
isEmpty
public boolean isEmpty()
clear
public void clear()
drainTo
public int drainTo(java.util.Collection<? super E> collection)