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<Multi<ByteBuffer>>,Supplier<Multi<ByteBuffer>>
- Enclosing interface:
- IoMulti
public static final class IoMulti.MultiFromByteChannelBuilder extends Object implements Builder<Multi<ByteBuffer>>
Fluent API builder for creating aMultifrom aReadableByteChannel.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IoMulti.MultiFromByteChannelBuilderbufferCapacity(int bufferCapacity)Capacity of byte buffer in number of bytes.Multi<ByteBuffer>build()Build the instance from this builder.IoMulti.MultiFromByteChannelBuilderexecutor(ScheduledExecutorService executor)Configure executor service to use for scheduling reads from the channel.IoMulti.MultiFromByteChannelBuilderretrySchema(RetrySchema retrySchema)Retry schema to use when reading from the channel.
-
-
-
Method Detail
-
build
public Multi<ByteBuffer> build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<Multi<ByteBuffer>>- Returns:
- instance of the built type
-
executor
public IoMulti.MultiFromByteChannelBuilder executor(ScheduledExecutorService 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
public IoMulti.MultiFromByteChannelBuilder retrySchema(RetrySchema 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
public IoMulti.MultiFromByteChannelBuilder bufferCapacity(int bufferCapacity)
Capacity of byte buffer in number of bytes.- Parameters:
bufferCapacity- capacity of the buffer, defaults to 8 Kb- Returns:
- updated builder instance
-
-