public final class Processors
extends java.lang.Object
SingleSource.Processor
and CompletableSource.Processor
.Modifier and Type | Method and Description |
---|---|
static <T> BlockingIterable.Processor<T> |
newBlockingIterableProcessor()
Create a new
BlockingIterable.Processor . |
static <T> BlockingIterable.Processor<T> |
newBlockingIterableProcessor(int maxBufferSize)
Create a new
BlockingIterable.Processor . |
static CompletableSource.Processor |
newCompletableProcessor()
Create a new
CompletableSource.Processor that allows for multiple
subscribes . |
static <T> SingleSource.Processor<T,T> |
newSingleProcessor()
Create a new
SingleSource.Processor that allows for multiple
subscribes . |
public static CompletableSource.Processor newCompletableProcessor()
CompletableSource.Processor
that allows for multiple
subscribes
.CompletableSource.Processor
that allows for multiple
subscribes
.public static <T> SingleSource.Processor<T,T> newSingleProcessor()
SingleSource.Processor
that allows for multiple
subscribes
.T
- The SingleSource
type and SingleSource.Subscriber
type of the
SingleSource.Processor
.SingleSource.Processor
that allows for multiple
subscribes
.public static <T> BlockingIterable.Processor<T> newBlockingIterableProcessor()
BlockingIterable.Processor
.T
- the type of elements emitted by the returned BlockingIterable
.BlockingIterable.Processor
.public static <T> BlockingIterable.Processor<T> newBlockingIterableProcessor(int maxBufferSize)
BlockingIterable.Processor
.T
- the type of elements emitted by the returned BlockingIterable
.maxBufferSize
- Maximum number of items that are requested to be sent via
BlockingIterable.Processor#next(Object)
but not yet emitted from a BlockingIterator
. If this
buffer size is reached a subsequent call to emit
will block till
an item is emitted from a BlockingIterator
.BlockingIterable.Processor
.