Module io.inverno.mod.http.base
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default outbound buffer capacity. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an outbound data sequencer withDEFAULT_BUFFER_CAPACITY.OutboundDataSequencer(int bufferCapacity) Creates an outbound data sequencer. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<io.netty.buffer.ByteBuf> apply(reactor.core.publisher.Flux<io.netty.buffer.ByteBuf> data)
-
Field Details
-
DEFAULT_BUFFER_CAPACITY
public static final int DEFAULT_BUFFER_CAPACITYThe 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