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 Details

    • build

      public Multi<ByteBuffer> build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<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

      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 using executor using the provided retry schema, to prolong the delays between retries.

      By default the first delay is 0 milliseconds, incrementing by 50 milliseconds up to 250 milliseconds.

      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