K - the type of the conflation keyV - the type of values in the queuepublic interface ExchangeConflationQueue<K,V> extends ConflationQueue<K,V>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ExchangeConflationQueue.ExchangePoller<K,V>
Poller object used by the consumer to poll values; exchange poller adds functionality for exchanging values with
the producer during poll operations.
|
ConflationQueue.Appender<K,V>, ConflationQueue.Poller<K,V>| Modifier and Type | Method and Description |
|---|---|
ConflationQueue.Appender<K,V> |
appender()
Returns the appender object used by the producer to enqueue values.
|
static <K,V> ConflationQueue.Appender<K,V> |
nullSafe(ConflationQueue.Appender<K,V> unsafeAppender,
java.util.function.Function<? super K,? extends V> valueFactory)
Returns an
Appender whose enqueue(..) method is guaranteed to
never return null. |
static <K,V> ExchangeConflationQueue<K,V> |
nullSafe(ExchangeConflationQueue<K,V> unsafeQueue,
java.util.function.Function<? super K,? extends V> valueFactory)
Returns an
ExchangeConflationQueue whose appender is guaranteed to never return null on enqueue. |
ExchangeConflationQueue.ExchangePoller<K,V> |
poller()
Returns the poller object used by the consumer to poll values.
|
sizeConflationQueue.Appender<K,V> appender()
ConflationQueueappender in interface ConflationQueue<K,V>ExchangeConflationQueue.ExchangePoller<K,V> poller()
ConflationQueuepoller in interface ConflationQueue<K,V>static <K,V> ExchangeConflationQueue<K,V> nullSafe(ExchangeConflationQueue<K,V> unsafeQueue, java.util.function.Function<? super K,? extends V> valueFactory)
ExchangeConflationQueue whose appender is guaranteed to never return null on enqueue. If the
unsafe queue returns null on enqueue e.g. because the queue is empty and no exchange values can be retrieved yet,
the specified factory is used to create a value.K - the type of the conflation keyV - the type of values in the queueunsafeQueue - the unsafe queue possibly returning null values on enqueuevalueFactory - the value factory used if the unsafe queue returned null when a value was enqueuedstatic <K,V> ConflationQueue.Appender<K,V> nullSafe(ConflationQueue.Appender<K,V> unsafeAppender, java.util.function.Function<? super K,? extends V> valueFactory)
Appender whose enqueue(..) method is guaranteed to
never return null. If the unsafe appender returns null on enqueue e.g. because the queue is empty and no
exchange values can be retrieved yet, the specified factory is used to create a value.K - the type of the conflation keyV - the type of values in the queueunsafeAppender - the unsafe appender possibly returning null values on enqueuevalueFactory - the value factory used if the unsafe enqueuing operation returned null