public final class DiscardOverflowsQueue extends LinkedBlockingQueue<Runnable>
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_CAPACITY
Default maximum capacity for
DiscardOverflowsQueue if no capacity
is specified (currently 15_000_000). |
| Constructor and Description |
|---|
DiscardOverflowsQueue()
Create a new DiscardOverflowsQueue of max capacity
DEFAULT_MAX_CAPACITY. |
DiscardOverflowsQueue(int capacity)
Create a new DiscardOverflowsQueue of max capacity
capacity. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Runnable o)
Non-blocking add.
|
boolean |
offer(Runnable o)
Non-blocking offer.
|
void |
put(Runnable o)
Non-blocking put.
|
clear, contains, drainTo, drainTo, iterator, offer, peek, poll, poll, remainingCapacity, remove, size, spliterator, take, toArray, toArray, toStringaddAll, element, removecontainsAll, isEmpty, removeAll, retainAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, streampublic static final int DEFAULT_MAX_CAPACITY
DiscardOverflowsQueue if no capacity
is specified (currently 15_000_000).public DiscardOverflowsQueue()
DEFAULT_MAX_CAPACITY.public DiscardOverflowsQueue(int capacity)
capacity.capacity - max capacity.public void put(Runnable o) throws InterruptedException
put in interface BlockingQueue<Runnable>put in class LinkedBlockingQueue<Runnable>InterruptedExceptionpublic boolean add(Runnable o)
add in interface Collection<Runnable>add in interface BlockingQueue<Runnable>add in interface Queue<Runnable>add in class AbstractQueue<Runnable>public boolean offer(Runnable o)
offer in interface BlockingQueue<Runnable>offer in interface Queue<Runnable>offer in class LinkedBlockingQueue<Runnable>Copyright © 2022. All rights reserved.