Class ConcurrentQueueFactory
java.lang.Object
com.sun.corba.ee.spi.transport.concurrent.ConcurrentQueueFactory
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
Constructor Details
-
ConcurrentQueueFactory
private ConcurrentQueueFactory()
-
-
Method Details
-
makeNonBlockingConcurrentQueue
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
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
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
-