Top Fields Constructors Methods
io.netty.channel.kqueue

pack-priv final Class KQueueRecvByteAllocatorHandle

extends DelegatingHandle
implements ExtendedHandle
Class Inheritance
All Implemented Interfaces
io.netty.channel.RecvByteBufAllocator.ExtendedHandle, io.netty.channel.RecvByteBufAllocator.Handle
Imports
io.netty.buffer.ByteBuf, .ByteBufAllocator, io.netty.channel.ChannelConfig, .RecvByteBufAllocator.DelegatingHandle, .RecvByteBufAllocator.ExtendedHandle, io.netty.channel.unix.PreferredDirectByteBufAllocator, io.netty.util.UncheckedBooleanSupplier

Deprecated

as a consequence of RecvByteBufAllocator.DelegatingHandle and RecvByteBufAllocator.ExtendedHandle being deprecated. See corresponding docs for further information.

Field Summary

Modifier and TypeField and Description
private final UncheckedBooleanSupplier
private long
private boolean
private final PreferredDirectByteBufAllocator
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
allocate(ByteBufAllocator alloc)

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.allocate.

Implements io.netty.channel.RecvByteBufAllocator.Handle.allocate.

Creates a new receive buffer whose capacity is probably large enough to read all inbound data and small enough not to waste its space.
public boolean
continueReading(UncheckedBooleanSupplier
A supplier that determines if there maybe more data to read.
maybeMoreDataSupplier
)

Implements io.netty.channel.RecvByteBufAllocator.ExtendedHandle.continueReading.

Same as Handle#continueReading() except "more data" is determined by the supplier parameter.
public boolean
public int
guess()

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.guess.

Implements io.netty.channel.RecvByteBufAllocator.Handle.guess.

Similar to allocate(ByteBufAllocator) except that it does not allocate anything but just tells the capacity.
private int
pack-priv boolean
public void
lastBytesRead(int
The number of bytes from the previous read operation. This may be negative if an read error occurs. If a negative value is seen it is expected to be return on the next call to lastBytesRead(). A negative value will signal a termination condition enforced externally to this class and is not required to be enforced in continueReading().
bytes
)

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.lastBytesRead.

Implements io.netty.channel.RecvByteBufAllocator.Handle.lastBytesRead.

Set the bytes that have been read for the last read operation.
pack-priv boolean
pack-priv void
numberBytesPending(long numberBytesPending)

pack-priv void
public void
reset(ChannelConfig
The channel configuration which may impact this object's behavior.
config
)

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.reset.

Implements io.netty.channel.RecvByteBufAllocator.Handle.reset.

Reset any counters that have accumulated and recommend how many messages/bytes should be read for the next read loop.
Inherited from io.netty.channel.RecvByteBufAllocator.DelegatingHandle:
attemptedBytesReadattemptedBytesReaddelegateincMessagesReadlastBytesReadreadComplete

Field Detail

defaultMaybeMoreDataSupplierback to summary
private final UncheckedBooleanSupplier defaultMaybeMoreDataSupplier
numberBytesPendingback to summary
private long numberBytesPending
overrideGuessback to summary
private boolean overrideGuess
preferredDirectByteBufAllocatorback to summary
private final PreferredDirectByteBufAllocator preferredDirectByteBufAllocator
readEOFback to summary
private boolean readEOF

Constructor Detail

KQueueRecvByteAllocatorHandleback to summary
pack-priv KQueueRecvByteAllocatorHandle(RecvByteBufAllocator.ExtendedHandle handle)

Deprecated

as a consequence of RecvByteBufAllocator.ExtendedHandle being deprecated. See corresponding docs for further information.

Method Detail

allocateback to summary
public ByteBuf allocate(ByteBufAllocator alloc)

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.allocate.

Implements io.netty.channel.RecvByteBufAllocator.Handle.allocate.

Doc from io.netty.channel.RecvByteBufAllocator.Handle.allocate.

Creates a new receive buffer whose capacity is probably large enough to read all inbound data and small enough not to waste its space.

Annotations
@Override
continueReadingback to summary
public boolean continueReading(UncheckedBooleanSupplier maybeMoreDataSupplier)

Implements io.netty.channel.RecvByteBufAllocator.ExtendedHandle.continueReading.

Doc from io.netty.channel.RecvByteBufAllocator.ExtendedHandle.continueReading.

Same as Handle#continueReading() except "more data" is determined by the supplier parameter.

Parameters
maybeMoreDataSupplier:UncheckedBooleanSupplier

A supplier that determines if there maybe more data to read.

Annotations
@Override
continueReadingback to summary
public boolean continueReading()

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.continueReading.

Implements io.netty.channel.RecvByteBufAllocator.Handle.continueReading.

Doc from io.netty.channel.RecvByteBufAllocator.Handle.continueReading.

Determine if the current read loop should continue.

Returns:boolean

true if the read loop should continue reading. false if the read loop is complete.

Annotations
@Override
guessback to summary
public int guess()

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.guess.

Implements io.netty.channel.RecvByteBufAllocator.Handle.guess.

Doc from io.netty.channel.RecvByteBufAllocator.Handle.guess.

Similar to allocate(ByteBufAllocator) except that it does not allocate anything but just tells the capacity.

Annotations
@Override
guess0back to summary
private int guess0()
isReadEOFback to summary
pack-priv boolean isReadEOF()
lastBytesReadback to summary
public void lastBytesRead(int bytes)

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.lastBytesRead.

Implements io.netty.channel.RecvByteBufAllocator.Handle.lastBytesRead.

Doc from io.netty.channel.RecvByteBufAllocator.Handle.lastBytesRead.

Set the bytes that have been read for the last read operation. This may be used to increment the number of bytes that have been read.

Parameters
bytes:int

The number of bytes from the previous read operation. This may be negative if an read error occurs. If a negative value is seen it is expected to be return on the next call to lastBytesRead(). A negative value will signal a termination condition enforced externally to this class and is not required to be enforced in continueReading().

Annotations
@Override
maybeMoreDataToReadback to summary
pack-priv boolean maybeMoreDataToRead()
numberBytesPendingback to summary
pack-priv void numberBytesPending(long numberBytesPending)
readEOFback to summary
pack-priv void readEOF()
resetback to summary
public void reset(ChannelConfig config)

Overrides io.netty.channel.RecvByteBufAllocator.DelegatingHandle.reset.

Implements io.netty.channel.RecvByteBufAllocator.Handle.reset.

Doc from io.netty.channel.RecvByteBufAllocator.Handle.reset.

Reset any counters that have accumulated and recommend how many messages/bytes should be read for the next read loop.

This may be used by continueReading() to determine if the read operation should complete.

This is only ever a hint and may be ignored by the implementation.
Parameters
config:ChannelConfig

The channel configuration which may impact this object's behavior.

Annotations
@Override