public class QueueRegistry
extends java.lang.Object
CollectionDocument
, used in StreamingCollectionReader
.StreamingCollectionReader
Modifier and Type | Method and Description |
---|---|
static QueueRegistry |
getInstance()
Returns the registry singleton.
|
java.util.concurrent.BlockingQueue<CollectionDocument> |
getQueue(java.lang.String queueName)
Retrieves and returns a registered queue by name.
|
java.util.concurrent.BlockingQueue<CollectionDocument> |
registerQueue(java.lang.String queueName,
int capacity)
Creates and registers a new
ArrayBlockingQueue with given initial
capacity. |
public static QueueRegistry getInstance()
public java.util.concurrent.BlockingQueue<CollectionDocument> getQueue(java.lang.String queueName)
queueName
- The name of the queue to retrievequeueName
java.lang.IllegalArgumentException
- if there is queue with the name queueName
public java.util.concurrent.BlockingQueue<CollectionDocument> registerQueue(java.lang.String queueName, int capacity)
ArrayBlockingQueue
with given initial
capacity.queueName
- The name of the queuecapacity
- The initial capacity of the queuejava.lang.IllegalArgumentException
- if queueName
is already registered.