- Type Parameters:
E -
- All Superinterfaces:
- java.util.Collection<E>, java.lang.Iterable<E>, java.util.Queue<E>
- All Known Implementing Classes:
- NoOpQueue, SynchronizedMinAwareQueue
public interface MinAwareQueue<E extends com.newrelic.agent.model.PriorityAware>
extends java.util.Queue<E>
Simple interface extending Queue with a peekLast method to get the tail (minimum priority) element of the queue.
The standard Queue interface only gives access to the head element, which for us is the element of maximum priority.
Read access to the minimum priority element can be used to avoid performing expensive object allocations
for low-priority events that would get rejected by the queue anyway.