Top Inners Fields Constructors Methods
io.netty5.channel.socket

public final Class SocketChannelWriteHandleFactory

extends MaxMessagesWriteHandleFactory
Class Inheritance
Imports
io.netty5.channel.Channel, .ChannelOption, .MaxMessagesWriteHandleFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final int
private final long

Constructor Summary

AccessConstructor and Description
public
SocketChannelWriteHandleFactory(int maxMessagesPerWrite)

public
SocketChannelWriteHandleFactory(int maxMessagesPerWrite, long maxBytesPerGatheringWrite)

Method Summary

Modifier and TypeMethod and Description
protected MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle
Inherited from io.netty5.channel.MaxMessagesWriteHandleFactory:
newHandle

Field Detail

MAX_BYTES_PER_GATHERING_WRITE_ATTEMPTED_LOW_THRESHOLDback to summary
private static final int MAX_BYTES_PER_GATHERING_WRITE_ATTEMPTED_LOW_THRESHOLD
maxBytesPerGatheringWriteback to summary
private final long maxBytesPerGatheringWrite

Constructor Detail

SocketChannelWriteHandleFactoryback to summary
public SocketChannelWriteHandleFactory(int maxMessagesPerWrite)
SocketChannelWriteHandleFactoryback to summary
public SocketChannelWriteHandleFactory(int maxMessagesPerWrite, long maxBytesPerGatheringWrite)

Method Detail

newHandleback to summary
protected MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle newHandle(Channel channel, int maxMessagesPerWrite)

Overrides io.netty5.channel.MaxMessagesWriteHandleFactory.newHandle.

Annotations
@Override
io.netty5.channel.socket back to summary

private final Class SocketChannelWriteHandleFactory.SndBufferWriteHandle

extends MaxMessagesWriteHandle
Class Inheritance

Field Summary

Modifier and TypeField and Description
private long
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
SndBufferWriteHandle(Channel channel, int maxMessagesPerWrite, long maxBytesPerGatheringWrite)

Method Summary

Modifier and TypeMethod and Description
private void
adjustMaxBytesPerGatheringWrite(long attempted, long written, long oldMaxBytesPerGatheringWrite)

private static long
calculateMaxBytesPerGatheringWrite(Channel channel, long maxBytesPerGatheringWrite)

public long
estimatedMaxBytesPerGatheringWrite()

Overrides default io.netty5.channel.WriteHandleFactory.WriteHandle.estimatedMaxBytesPerGatheringWrite.

Estimate the maximum number of bytes that can be written with one gathering write operation.
public boolean
lastWrite(long
The number of bytes the write operation did attempt to write.
attemptedBytesWrite
,
long
The number of bytes from the previous write operation. This may be negative if a write error occurs.
actualBytesWrite
,
int
The number of messages written.
numMessagesWrite
)

Overrides io.netty5.channel.MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle.lastWrite.

Implements io.netty5.channel.WriteHandleFactory.WriteHandle.lastWrite.

Notify the WriteHandle of the last write operation and its result.
Inherited from io.netty5.channel.MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle:
writeComplete

Field Detail

calculatedMaxBytesPerGatheringWriteback to summary
private long calculatedMaxBytesPerGatheringWrite
maxBytesPerGatheringWriteback to summary
private final long maxBytesPerGatheringWrite

Constructor Detail

SndBufferWriteHandleback to summary
pack-priv SndBufferWriteHandle(Channel channel, int maxMessagesPerWrite, long maxBytesPerGatheringWrite)

Method Detail

adjustMaxBytesPerGatheringWriteback to summary
private void adjustMaxBytesPerGatheringWrite(long attempted, long written, long oldMaxBytesPerGatheringWrite)
calculateMaxBytesPerGatheringWriteback to summary
private static long calculateMaxBytesPerGatheringWrite(Channel channel, long maxBytesPerGatheringWrite)
estimatedMaxBytesPerGatheringWriteback to summary
public long estimatedMaxBytesPerGatheringWrite()

Overrides default io.netty5.channel.WriteHandleFactory.WriteHandle.estimatedMaxBytesPerGatheringWrite.

Doc from io.netty5.channel.WriteHandleFactory.WriteHandle.estimatedMaxBytesPerGatheringWrite.

Estimate the maximum number of bytes that can be written with one gathering write operation.

Annotations
@Override
lastWriteback to summary
public boolean lastWrite(long attemptedBytesWrite, long actualBytesWrite, int numMessagesWrite)

Overrides io.netty5.channel.MaxMessagesWriteHandleFactory.MaxMessagesWriteHandle.lastWrite.

Implements io.netty5.channel.WriteHandleFactory.WriteHandle.lastWrite.

Doc from io.netty5.channel.WriteHandleFactory.WriteHandle.lastWrite.

Notify the WriteHandle of the last write operation and its result.

Parameters
attemptedBytesWrite:long

The number of bytes the write operation did attempt to write.

actualBytesWrite:long

The number of bytes from the previous write operation. This may be negative if a write error occurs.

numMessagesWrite:int

The number of messages written.

Returns:boolean

true if the write loop should continue writing, false otherwise.

Annotations
@Override