public interface Rejector<E>
MemorySafeLinkedBlockingQueue.AbortPolicy,
DiscardPolicy,
DiscardOldestPolicy| Modifier and Type | Method and Description |
|---|---|
void |
reject(E e,
java.util.Queue<E> queue)
Method that may be invoked by a
MemorySafeLinkedBlockingQueue when
MemorySafeLinkedBlockingQueue.hasRemainedMemory() return true. |
void reject(E e, java.util.Queue<E> queue)
MemorySafeLinkedBlockingQueue when
MemorySafeLinkedBlockingQueue.hasRemainedMemory() return true.
This may occur when no more memory are available because their bounds would be exceeded.
In the absence of other alternatives, the method may throw an unchecked
RejectException, which will be propagated to the caller.
e - the element requested to be addedqueue - the queue attempting to add this elementRejectException - if there is no more memoryCopyright © 2024 The Apache Software Foundation. All rights reserved.