public class AsyncGeneratorQueue extends Object
| Constructor and Description |
|---|
AsyncGeneratorQueue() |
| Modifier and Type | Method and Description |
|---|---|
static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> |
of(Q queue,
Consumer<Q> consumer)
Creates an AsyncGenerator from the provided blocking queue and consumer.
|
static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> |
of(Q queue,
Executor executor,
Consumer<Q> consumer)
Creates an AsyncGenerator from the provided queue, executor, and consumer.
|
public static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> AsyncGenerator<E> of(Q queue, Consumer<Q> consumer)
E - the type of elements in the queueQ - the type of blocking queuequeue - the blocking queue to generate elements fromconsumer - the consumer for processing elements from the queuepublic static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> AsyncGenerator<E> of(Q queue, Executor executor, Consumer<Q> consumer)
E - the type of elements in the queueQ - the type of blocking queuequeue - the blocking queue to generate elements fromexecutor - the executor for asynchronous processingconsumer - the consumer for processing elements from the queueCopyright © 2024. All rights reserved.