Interface StreamProducer<T>
- Type Parameters:
T- item type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Producer for a scheduler-managed result stream.
-
Method Summary
Modifier and TypeMethodDescriptionvoidproduce(WorkloadContext context, TaskCancellationToken cancellationToken, StreamEmitter<T> emitter) Produces stream items through the emitter.
-
Method Details
-
produce
void produce(WorkloadContext context, TaskCancellationToken cancellationToken, StreamEmitter<T> emitter) throws Exception Produces stream items through the emitter.- Parameters:
context- workload contextcancellationToken- cancellation tokenemitter- item emitter- Throws:
Exception- producer failure
-