K - the type of the conflation keyV - the type of values in the queue@FunctionalInterface public static interface ExchangeConflationQueue.ExchangePoller<K,V> extends ConflationQueue.Poller<K,V>
| Modifier and Type | Method and Description |
|---|---|
default V |
poll(java.util.function.BiConsumer<? super K,? super V> consumer)
Polls the queue passing an unused value in exchange to the queue.
|
V |
poll(java.util.function.BiConsumer<? super K,? super V> consumer,
V exchange)
Polls the queue passing an unused value in exchange to the queue.
|
pollV poll(java.util.function.BiConsumer<? super K,? super V> consumer, V exchange)
consumer - consumer for conflation key and polled valueexchange - a value offered in exchange for the polled value, to be returned by an enqueue operationdefault V poll(java.util.function.BiConsumer<? super K,? super V> consumer)
poll in interface ConflationQueue.Poller<K,V>consumer - consumer for conflation key and polled value