Deprecated, for removal: This API element is subject to removal in a future version.
Represents a queue-based asynchronous generator.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.Inner class to generate asynchronous elements from the queue. -
Method Summary
Modifier and TypeMethodDescriptionstatic <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>>
AsyncGenerator<E>Deprecated, for removal: This API element is subject to removal in a future version.Creates an AsyncGenerator from the provided blocking queue and consumer.static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>>
AsyncGenerator<E>Deprecated, for removal: This API element is subject to removal in a future version.Creates an AsyncGenerator from the provided queue, executor, and consumer.
-
Method Details
-
of
static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> AsyncGenerator<E> of(Q queue, Consumer<Q> consumer) Deprecated, for removal: This API element is subject to removal in a future version.Creates an AsyncGenerator from the provided blocking queue and consumer.- Type Parameters:
E- the type of elements in the queueQ- the type of blocking queue- Parameters:
queue- the blocking queue to generate elements fromconsumer- the consumer for processing elements from the queue- Returns:
- an AsyncGenerator instance
-
of
static <E,Q extends BlockingQueue<AsyncGenerator.Data<E>>> AsyncGenerator<E> of(Q queue, Consumer<Q> consumer, Executor executor) Deprecated, for removal: This API element is subject to removal in a future version.Creates an AsyncGenerator from the provided queue, executor, and consumer.- Type Parameters:
E- the type of elements in the queueQ- the type of blocking queue- Parameters:
queue- the blocking queue to generate elements fromconsumer- the consumer for processing elements from the queueexecutor- the executor for asynchronous processing- Returns:
- an AsyncGenerator instance
-
AsyncGeneratorFlowinstead