Class ConcurrentQueueFactory

java.lang.Object
com.sun.corba.ee.spi.transport.concurrent.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.
  • Constructor Details

    • ConcurrentQueueFactory

      private ConcurrentQueueFactory()
  • Method Details

    • makeNonBlockingConcurrentQueue

      public static <V> ConcurrentQueue makeNonBlockingConcurrentQueue(long ttl)
      Create a ConcurrentQueue whose implementation never blocks. Currently not fully implemented: the NonBlocking and Blocking impls are basically the same.
      Type Parameters:
      V - type of queue
      Parameters:
      ttl - time to live in milliseconds
      Returns:
      ConcurrentQueue
    • makeBlockingConcurrentQueue

      public static <V> ConcurrentQueue makeBlockingConcurrentQueue(long ttl)
      Create a ConcurrentQueue whose implementation uses conventional locking to protect the data structure.
      Type Parameters:
      V - type of queue
      Parameters:
      ttl - time to live in milliseconds
      Returns:
      ConcurrentQueue
    • makeConcurrentQueue

      public static <V> ConcurrentQueue makeConcurrentQueue(long ttl)
      Create a ConcurrentQueue that does no locking at all. For use in data structures that manage their own locking.
      Type Parameters:
      V - type of queue
      Parameters:
      ttl - time to live in milliseconds
      Returns:
      ConcurrentQueue