Class SynchronizedQueue<E>

  • Type Parameters:
    E - the type of the elements in the collection
    All Implemented Interfaces:
    Serializable, Iterable<E>, Collection<E>, Queue<E>

    public class SynchronizedQueue<E>
    extends SynchronizedCollection<E>
    implements Queue<E>
    Decorates another Queue to synchronize its behaviour for a multi-threaded environment.

    Methods are synchronized, then forwarded to the decorated queue. Iterators must be separately synchronized around the loop.

    Since:
    4.2
    See Also:
    Serialized Form