public class MultiplexInMemoryQueueManager
extends java.lang.Object
| Constructor and Description |
|---|
MultiplexInMemoryQueueManager()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<T> void |
add(java.lang.String key,
T item)
Add item in the queue for given key.
|
<T> void |
addMultiple(java.lang.String key,
java.util.List<T> list)
Add multiple items in the queue for given queue.
|
protected void |
enqueMissedMuxIfAny(java.lang.String key)
Enqueue all the missed items back to the queue.
|
protected <T> java.util.function.Consumer<MuxWrapper> |
getConsumer(java.util.function.Consumer<T> consumer)
Get the consumer of queue which will process the actual paased consumer.
|
protected void |
init() |
<T> void |
register(java.lang.String key,
java.util.function.Consumer<T> consumer)
Register a consumer against a key.
|
DynamicSettings<MuxWrapper> |
setDynamicSettings()
Set dynamic nature for this queue.
|
protected void init()
public <T> void register(java.lang.String key,
java.util.function.Consumer<T> consumer)
T - type of consumerkey - Key of dataconsumer - Consumer logicprotected void enqueMissedMuxIfAny(java.lang.String key)
key - Key for which any missing items is processedprotected <T> java.util.function.Consumer<MuxWrapper> getConsumer(java.util.function.Consumer<T> consumer)
T - type of consumerconsumer - Actual consumer logicpublic DynamicSettings<MuxWrapper> setDynamicSettings()
public <T> void add(java.lang.String key,
T item)
T - type of datakey - Key for which this data is designateditem - Item to be addedpublic <T> void addMultiple(java.lang.String key,
java.util.List<T> list)
T - type of datakey - Key against which we want to add the datalist - Collection having data