public final class CompletableBlockingQueue<T> extends ArrayBlockingQueue<T> implements CompletableQueue<T>
Constructor and Description |
---|
CompletableBlockingQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
complete()
Mark this queue as complete
|
boolean |
isComplete()
Get the number of items persisted right now.
|
T |
poll() |
T |
poll(long timeout,
TimeUnit unit) |
T |
take() |
add, clear, contains, drainTo, drainTo, iterator, offer, offer, peek, put, remainingCapacity, remove, size, spliterator, toArray, toArray, toString
addAll, element, remove
containsAll, isEmpty, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
public void complete()
CompletableQueue
complete
in interface CompletableQueue<T>
public boolean isComplete()
CompletableQueue
isComplete
in interface CompletableQueue<T>
this#complete()
public T take() throws InterruptedException
take
in interface BlockingQueue<T>
take
in class ArrayBlockingQueue<T>
InterruptedException
public T poll()
public T poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<T>
poll
in class ArrayBlockingQueue<T>
InterruptedException
Copyright © 2017. All rights reserved.