Class PendingZeroCopyWrites
java.lang.Object
io.netty.channel.uring.PendingZeroCopyWrites
final class PendingZeroCopyWrites
extends java.lang.Object
Retains buffers until their zero-copy notifications arrive.
freeIdStack is a LIFO stack of available IDs indexing pooled. Submission pops an ID;
a failed submission, a primary CQE without MORE, or the NOTIF CQE returns it. This allows out-of-order
notifications to recycle IDs independently.
The pool grows up to Short.MAX_VALUE IDs. If all are in use, for example because notifications
lag behind new writes, further requests receive increasing long IDs above that range. Their retained
buffers are stored in overflow until NOTIF, and these IDs are never reused. Returned pooled IDs
are preferred even while overflow requests remain pending.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate short[]private intprivate static final intprivate longprivate PendingZeroCopyWrites.PendingWrite[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) longprivate long(package private) voidrecycle(long userData) (package private) PendingZeroCopyWrites.PendingWriteregister(long userData) registerOverflow(long userData) (package private) voidrelease(long userData) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
MAX_POOLED_ID
private static final int MAX_POOLED_ID- See Also:
-
pooled
-
freeIdStack
private short[] freeIdStack -
freeStackTop
private int freeStackTop -
nextOverflowId
private long nextOverflowId -
overflow
-
-
Constructor Details
-
PendingZeroCopyWrites
PendingZeroCopyWrites()
-
-
Method Details
-
nextUserData
long nextUserData() -
nextUserDataSlow
private long nextUserDataSlow() -
register
-
registerOverflow
-
release
void release(long userData) -
recycle
void recycle(long userData)
-