Class SyncQueue<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 SyncQueue<E>
    extends java.util.concurrent.LinkedBlockingQueue<E>
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  SyncQueue.Closer<E>  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(E elem)  
      E poll()  
      void put​(E elem)  
      void release()  
      • Methods inherited from class java.util.concurrent.LinkedBlockingQueue

        clear, contains, drainTo, drainTo, forEach, iterator, offer, offer, peek, poll, 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.Collection

        addAll, containsAll, equals, hashCode, isEmpty, parallelStream, stream, toArray
      • Methods inherited from interface java.util.Queue

        element, remove
    • Constructor Detail

      • SyncQueue

        public SyncQueue​(int size)
    • Method Detail

      • poll

        public E poll()
        Specified by:
        poll in interface java.util.Queue<E>
        Overrides:
        poll in class java.util.concurrent.LinkedBlockingQueue<E>
      • add

        public boolean add​(E elem)
        Specified by:
        add in interface java.util.concurrent.BlockingQueue<E>
        Specified by:
        add in interface java.util.Collection<E>
        Specified by:
        add in interface java.util.Queue<E>
        Overrides:
        add in class java.util.AbstractQueue<E>
      • put

        public void put​(E elem)
        Specified by:
        put in interface java.util.concurrent.BlockingQueue<E>
        Overrides:
        put in class java.util.concurrent.LinkedBlockingQueue<E>
      • release

        public void release()