Class ConcurrentQueueFactory
- java.lang.Object
-
- com.sun.corba.ee.spi.transport.concurrent.ConcurrentQueueFactory
-
public final class ConcurrentQueueFactory extends java.lang.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 Summary
Constructors Modifier Constructor Description private
ConcurrentQueueFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> ConcurrentQueue
makeBlockingConcurrentQueue(long ttl)
Create a ConcurrentQueue whose implementation uses conventional locking to protect the data structure.static <V> ConcurrentQueue
makeConcurrentQueue(long ttl)
Create a ConcurrentQueue that does no locking at all.static <V> ConcurrentQueue
makeNonBlockingConcurrentQueue(long ttl)
Create a ConcurrentQueue whose implementation never blocks.
-
-
-
Method Detail
-
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
-
-