Package io.netty.channel.epoll
Class EpollRecvByteAllocatorHandle
- java.lang.Object
-
- io.netty.channel.RecvByteBufAllocator.DelegatingHandle
-
- io.netty.channel.epoll.EpollRecvByteAllocatorHandle
-
- All Implemented Interfaces:
RecvByteBufAllocator.ExtendedHandle
,RecvByteBufAllocator.Handle
- Direct Known Subclasses:
EpollRecvByteAllocatorStreamingHandle
class EpollRecvByteAllocatorHandle extends RecvByteBufAllocator.DelegatingHandle implements RecvByteBufAllocator.ExtendedHandle
-
-
Field Summary
Fields Modifier and Type Field Description private UncheckedBooleanSupplier
defaultMaybeMoreDataSupplier
private boolean
isEdgeTriggered
private PreferredDirectByteBufAllocator
preferredDirectByteBufAllocator
private boolean
receivedRdHup
-
Constructor Summary
Constructors Constructor Description EpollRecvByteAllocatorHandle(RecvByteBufAllocator.ExtendedHandle handle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuf
allocate(ByteBufAllocator alloc)
Creates a new receive buffer whose capacity is probably large enough to read all inbound data and small enough not to waste its space.boolean
continueReading()
Determine if the current read loop should continue.boolean
continueReading(UncheckedBooleanSupplier maybeMoreDataSupplier)
Same asRecvByteBufAllocator.Handle.continueReading()
except "more data" is determined by the supplier parameter.(package private) void
edgeTriggered(boolean edgeTriggered)
(package private) boolean
isEdgeTriggered()
(package private) boolean
isReceivedRdHup()
(package private) boolean
maybeMoreDataToRead()
(package private) void
receivedRdHup()
-
Methods inherited from class io.netty.channel.RecvByteBufAllocator.DelegatingHandle
attemptedBytesRead, attemptedBytesRead, delegate, guess, incMessagesRead, lastBytesRead, lastBytesRead, readComplete, reset
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.RecvByteBufAllocator.Handle
attemptedBytesRead, attemptedBytesRead, guess, incMessagesRead, lastBytesRead, lastBytesRead, readComplete, reset
-
-
-
-
Field Detail
-
preferredDirectByteBufAllocator
private final PreferredDirectByteBufAllocator preferredDirectByteBufAllocator
-
defaultMaybeMoreDataSupplier
private final UncheckedBooleanSupplier defaultMaybeMoreDataSupplier
-
isEdgeTriggered
private boolean isEdgeTriggered
-
receivedRdHup
private boolean receivedRdHup
-
-
Constructor Detail
-
EpollRecvByteAllocatorHandle
EpollRecvByteAllocatorHandle(RecvByteBufAllocator.ExtendedHandle handle)
-
-
Method Detail
-
receivedRdHup
final void receivedRdHup()
-
isReceivedRdHup
final boolean isReceivedRdHup()
-
maybeMoreDataToRead
boolean maybeMoreDataToRead()
-
edgeTriggered
final void edgeTriggered(boolean edgeTriggered)
-
isEdgeTriggered
final boolean isEdgeTriggered()
-
allocate
public final ByteBuf allocate(ByteBufAllocator alloc)
Description copied from interface:RecvByteBufAllocator.Handle
Creates a new receive buffer whose capacity is probably large enough to read all inbound data and small enough not to waste its space.- Specified by:
allocate
in interfaceRecvByteBufAllocator.Handle
- Overrides:
allocate
in classRecvByteBufAllocator.DelegatingHandle
-
continueReading
public final boolean continueReading(UncheckedBooleanSupplier maybeMoreDataSupplier)
Description copied from interface:RecvByteBufAllocator.ExtendedHandle
Same asRecvByteBufAllocator.Handle.continueReading()
except "more data" is determined by the supplier parameter.- Specified by:
continueReading
in interfaceRecvByteBufAllocator.ExtendedHandle
- Parameters:
maybeMoreDataSupplier
- A supplier that determines if there maybe more data to read.
-
continueReading
public final boolean continueReading()
Description copied from interface:RecvByteBufAllocator.Handle
Determine if the current read loop should continue.- Specified by:
continueReading
in interfaceRecvByteBufAllocator.Handle
- Overrides:
continueReading
in classRecvByteBufAllocator.DelegatingHandle
- Returns:
true
if the read loop should continue reading.false
if the read loop is complete.
-
-