Top Description Inners Fields Constructors Methods
io.netty5.channel

public Class FixedReadHandleFactory

extends MaxMessagesReadHandleFactory
Class Inheritance
Static Imports
io.netty5.util.internal.ObjectUtil.checkPositive

The ReadHandleFactory that always yields the same buffer size prediction. This handle ignores the feedback from the I/O thread.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
public
FixedReadHandleFactory(int bufferSize)

Creates a new predictor that always returns the same prediction of the specified buffer size.

public
FixedReadHandleFactory(int maxMessagesPerRead, int bufferSize)

Method Summary

Modifier and TypeMethod and Description
public MaxMessagesReadHandleFactory.MaxMessageReadHandle
newMaxMessageHandle(int
the maximum number of messages to read per read loop.
maxMessagesPerRead
)

Implements abstract io.netty5.channel.MaxMessagesReadHandleFactory.newMaxMessageHandle.

Creates a new MaxMessageReadHandle to use.
Inherited from io.netty5.channel.MaxMessagesReadHandleFactory:
newHandle

Field Detail

bufferSizeback to summary
private final int bufferSize

Constructor Detail

FixedReadHandleFactoryback to summary
public FixedReadHandleFactory(int bufferSize)

Creates a new predictor that always returns the same prediction of the specified buffer size.

FixedReadHandleFactoryback to summary
public FixedReadHandleFactory(int maxMessagesPerRead, int bufferSize)

Method Detail

newMaxMessageHandleback to summary
public MaxMessagesReadHandleFactory.MaxMessageReadHandle newMaxMessageHandle(int maxMessagesPerRead)

Implements abstract io.netty5.channel.MaxMessagesReadHandleFactory.newMaxMessageHandle.

Doc from io.netty5.channel.MaxMessagesReadHandleFactory.newMaxMessageHandle.

Creates a new MaxMessageReadHandle to use.

Parameters
maxMessagesPerRead:int

the maximum number of messages to read per read loop.

Returns:MaxMessagesReadHandleFactory.MaxMessageReadHandle

the handle.

Annotations
@Override
io.netty5.channel back to summary

private final Class FixedReadHandleFactory.ReadHandleImpl

extends MaxMessageReadHandle
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
ReadHandleImpl(int maxMessagesPerRead, int bufferSize)

Method Summary

Modifier and TypeMethod and Description
public int
estimatedBufferCapacity()

Implements io.netty5.channel.ReadHandleFactory.ReadHandle.estimatedBufferCapacity.

Guess the capacity for the next receive buffer that is probably large enough to read all inbound data and small enough not to waste its space.
Inherited from io.netty5.channel.MaxMessagesReadHandleFactory.MaxMessageReadHandle:
lastReadreadComplete

Field Detail

bufferSizeback to summary
private final int bufferSize

Constructor Detail

ReadHandleImplback to summary
pack-priv ReadHandleImpl(int maxMessagesPerRead, int bufferSize)

Method Detail

estimatedBufferCapacityback to summary
public int estimatedBufferCapacity()

Implements io.netty5.channel.ReadHandleFactory.ReadHandle.estimatedBufferCapacity.

Doc from io.netty5.channel.ReadHandleFactory.ReadHandle.estimatedBufferCapacity.

Guess the capacity for the next receive buffer that is probably large enough to read all inbound data and small enough not to waste its space.

Annotations
@Override