Class BoundedPriorityBlockngQueue<E>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.concurrent.BlockingQueue<E>, java.util.Queue<E>

    public class BoundedPriorityBlockngQueue<E>
    extends java.util.concurrent.PriorityBlockingQueue<E>
    implements java.util.concurrent.BlockingQueue<E>
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BoundedPriorityBlockngQueue​(int capacity, java.util.Comparator<E> comparator)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int drainTo​(java.util.Collection<? super E> c, int maxElements)  
      boolean offer​(E element)  
      • Methods inherited from class java.util.concurrent.PriorityBlockingQueue

        add, clear, comparator, contains, drainTo, forEach, iterator, offer, peek, poll, poll, put, remainingCapacity, remove, removeAll, removeIf, retainAll, size, spliterator, take, toArray, toArray, toString
      • Methods inherited from class java.util.AbstractQueue

        addAll, element, remove
      • Methods inherited from class java.util.AbstractCollection

        containsAll, isEmpty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.BlockingQueue

        add, contains, drainTo, offer, poll, put, remainingCapacity, remove, take
      • Methods inherited from interface java.util.Collection

        addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Queue

        element, peek, poll, remove
    • Constructor Detail

      • BoundedPriorityBlockngQueue

        public BoundedPriorityBlockngQueue​(int capacity,
                                           java.util.Comparator<E> comparator)
    • Method Detail

      • offer

        public boolean offer​(E element)
        Specified by:
        offer in interface java.util.concurrent.BlockingQueue<E>
        Specified by:
        offer in interface java.util.Queue<E>
        Overrides:
        offer in class java.util.concurrent.PriorityBlockingQueue<E>
      • drainTo

        public int drainTo​(java.util.Collection<? super E> c,
                           int maxElements)
        Specified by:
        drainTo in interface java.util.concurrent.BlockingQueue<E>
        Overrides:
        drainTo in class java.util.concurrent.PriorityBlockingQueue<E>