Package com.naver.ads.collect
Class SynchronizedQueue
-
- All Implemented Interfaces:
-
java.util.Queue,kotlin.collections.Collection,kotlin.collections.Collection,kotlin.collections.Iterable,kotlin.collections.Iterable,kotlin.collections.MutableCollection,kotlin.collections.MutableCollection,kotlin.collections.MutableIterable,kotlin.collections.MutableIterable
public class SynchronizedQueue<E extends Object> extends SynchronizedCollection<E> implements Queue<E>
Decorates another Queue to synchronize its behavior for a multithreaded environment.
Methods are synchronized, then forwarded to the decorated queue. Iterators must be separately synchronized around the loop.
-
-
Constructor Summary
Constructors Constructor Description SynchronizedQueue(Queue<E> queue, Object lock)Constructor that wraps (not copies). SynchronizedQueue(Queue<E> queue)Constructor that wraps (not copies).
-