Class ConcurrentQueueFactory


  • public final class ConcurrentQueueFactory
    extends Object
    A factory class for creating instances of ConcurrentQueue. Note that a rather unusual syntax is needed for calling these methods: ConcurrentQueueFactory.<V>makeXXXConcurrentQueue() This is required because the type variable V is not used in the parameters of the factory method, so the correct type cannot be inferred by the compiler.
    • Method Detail

      • makeBlockingConcurrentQueue

        public static <V> ConcurrentQueue<V> makeBlockingConcurrentQueue()
        Create a ConcurrentQueue whose implementation uses conventional locking to protect the data structure.
      • makeConcurrentQueue

        public static <V> ConcurrentQueue<V> makeConcurrentQueue()
        Create a ConcurrentQueue that does no locking at all. For use in data structures that manage their own locking.