Package io.netty.channel.kqueue
Class KQueueRecvByteAllocatorHandle
- java.lang.Object
-
- io.netty.channel.RecvByteBufAllocator.DelegatingHandle
-
- io.netty.channel.kqueue.KQueueRecvByteAllocatorHandle
-
- All Implemented Interfaces:
RecvByteBufAllocator.ExtendedHandle,RecvByteBufAllocator.Handle
final class KQueueRecvByteAllocatorHandle extends RecvByteBufAllocator.DelegatingHandle implements RecvByteBufAllocator.ExtendedHandle
-
-
Field Summary
Fields Modifier and Type Field Description private UncheckedBooleanSupplierdefaultMaybeMoreDataSupplierprivate longnumberBytesPendingprivate PreferredDirectByteBufAllocatorpreferredDirectByteBufAllocatorprivate booleanreadEOF
-
Constructor Summary
Constructors Constructor Description KQueueRecvByteAllocatorHandle(RecvByteBufAllocator.ExtendedHandle handle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufallocate(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.booleancontinueReading()Determine if the current read loop should continue.booleancontinueReading(UncheckedBooleanSupplier maybeMoreDataSupplier)Same asRecvByteBufAllocator.Handle.continueReading()except "more data" is determined by the supplier parameter.(package private) booleanisReadEOF()private booleanmaybeMoreDataToRead()(package private) voidnumberBytesPending(long numberBytesPending)(package private) voidreadEOF()-
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
-
readEOF
private boolean readEOF
-
numberBytesPending
private long numberBytesPending
-
-
Constructor Detail
-
KQueueRecvByteAllocatorHandle
KQueueRecvByteAllocatorHandle(RecvByteBufAllocator.ExtendedHandle handle)
-
-
Method Detail
-
allocate
public ByteBuf allocate(ByteBufAllocator alloc)
Description copied from interface:RecvByteBufAllocator.HandleCreates 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:
allocatein interfaceRecvByteBufAllocator.Handle- Overrides:
allocatein classRecvByteBufAllocator.DelegatingHandle
-
continueReading
public boolean continueReading(UncheckedBooleanSupplier maybeMoreDataSupplier)
Description copied from interface:RecvByteBufAllocator.ExtendedHandleSame asRecvByteBufAllocator.Handle.continueReading()except "more data" is determined by the supplier parameter.- Specified by:
continueReadingin interfaceRecvByteBufAllocator.ExtendedHandle- Parameters:
maybeMoreDataSupplier- A supplier that determines if there maybe more data to read.
-
continueReading
public boolean continueReading()
Description copied from interface:RecvByteBufAllocator.HandleDetermine if the current read loop should continue.- Specified by:
continueReadingin interfaceRecvByteBufAllocator.Handle- Overrides:
continueReadingin classRecvByteBufAllocator.DelegatingHandle- Returns:
trueif the read loop should continue reading.falseif the read loop is complete.
-
readEOF
void readEOF()
-
isReadEOF
boolean isReadEOF()
-
numberBytesPending
void numberBytesPending(long numberBytesPending)
-
maybeMoreDataToRead
private boolean maybeMoreDataToRead()
-
-