Module io.helidon.common.reactive
Package io.helidon.common.reactive
Class IoMulti.MultiFromByteChannelBuilder
java.lang.Object
io.helidon.common.reactive.IoMulti.MultiFromByteChannelBuilder
- All Implemented Interfaces:
Builder<IoMulti.MultiFromByteChannelBuilder,,Multi<ByteBuffer>> Supplier<Multi<ByteBuffer>>
- Enclosing interface:
IoMulti
public static final class IoMulti.MultiFromByteChannelBuilder
extends Object
implements Builder<IoMulti.MultiFromByteChannelBuilder,Multi<ByteBuffer>>
Fluent API builder for creating a
Multi from a
ReadableByteChannel.-
Method Summary
Modifier and TypeMethodDescriptionbufferCapacity(int bufferCapacity) Capacity of byte buffer in number of bytes.build()Build the instance from this builder.executor(ScheduledExecutorService executor) Configure executor service to use for scheduling reads from the channel.retrySchema(RetrySchema retrySchema) Retry schema to use when reading from the channel.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<IoMulti.MultiFromByteChannelBuilder,Multi<ByteBuffer>> - Returns:
- instance of the built type
-
executor
Configure executor service to use for scheduling reads from the channel. If an executor is configured using this method, it will not be terminated when the publisher completes.- Parameters:
executor- to use for scheduling- Returns:
- updated builder instance
-
retrySchema
Retry schema to use when reading from the channel. If a channel read fails (e.g. no data is read), the read is scheduled usingexecutorusing the provided retry schema, to prolong the delays between retries.By default the first delay is
0milliseconds, incrementing by50 millisecondsup to250milliseconds.- Parameters:
retrySchema- schema to use- Returns:
- updated builder instance
-
bufferCapacity
Capacity of byte buffer in number of bytes.- Parameters:
bufferCapacity- capacity of the buffer, defaults to 8 Kb- Returns:
- updated builder instance
-