Class OutboundDataSequencer

java.lang.Object
io.inverno.mod.http.base.internal.OutboundDataSequencer
All Implemented Interfaces:
Function<reactor.core.publisher.Flux<io.netty.buffer.ByteBuf>,reactor.core.publisher.Flux<io.netty.buffer.ByteBuf>>

public class OutboundDataSequencer extends Object implements Function<reactor.core.publisher.Flux<io.netty.buffer.ByteBuf>,reactor.core.publisher.Flux<io.netty.buffer.ByteBuf>>

A sequencer of outbound data.

It is basically used to buffer outbound data before sending them in order to avoid small data chunk and optimize network performances.

Since:
1.6
Author:
Jeremy Kuhn
  • Field Details

    • DEFAULT_BUFFER_CAPACITY

      public static final int DEFAULT_BUFFER_CAPACITY
      The default outbound buffer capacity.
      See Also:
  • Constructor Details

    • OutboundDataSequencer

      public OutboundDataSequencer()

      Creates an outbound data sequencer with DEFAULT_BUFFER_CAPACITY.

    • OutboundDataSequencer

      public OutboundDataSequencer(int bufferCapacity)

      Creates an outbound data sequencer.

      Parameters:
      bufferCapacity - the buffer capacity
  • Method Details

    • apply

      public reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> apply(reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> data)
      Specified by:
      apply in interface Function<reactor.core.publisher.Flux<io.netty.buffer.ByteBuf>,reactor.core.publisher.Flux<io.netty.buffer.ByteBuf>>