Package io.netty.channel.uring
Class PendingZeroCopyWrites
- java.lang.Object
-
- io.netty.channel.uring.PendingZeroCopyWrites
-
final class PendingZeroCopyWrites extends java.lang.ObjectRetains buffers until their zero-copy notifications arrive.freeIdStackis a LIFO stack of available IDs indexingpooled. 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_VALUEIDs. 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 inoverflowuntil NOTIF, and these IDs are never reused. Returned pooled IDs are preferred even while overflow requests remain pending.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classPendingZeroCopyWrites.PendingWrite
-
Field Summary
Fields Modifier and Type Field Description private short[]freeIdStackprivate intfreeStackTopprivate static intMAX_POOLED_IDprivate longnextOverflowIdprivate LongObjectHashMap<PendingZeroCopyWrites.PendingWrite>overflowprivate PendingZeroCopyWrites.PendingWrite[]pooled
-
Constructor Summary
Constructors Constructor Description PendingZeroCopyWrites()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) longnextUserData()private longnextUserDataSlow()(package private) voidrecycle(long userData)(package private) PendingZeroCopyWrites.PendingWriteregister(long userData)private PendingZeroCopyWrites.PendingWriteregisterOverflow(long userData)(package private) voidrelease(long userData)
-
-
-
Field Detail
-
MAX_POOLED_ID
private static final int MAX_POOLED_ID
- See Also:
- Constant Field Values
-
pooled
private PendingZeroCopyWrites.PendingWrite[] pooled
-
freeIdStack
private short[] freeIdStack
-
freeStackTop
private int freeStackTop
-
nextOverflowId
private long nextOverflowId
-
overflow
private LongObjectHashMap<PendingZeroCopyWrites.PendingWrite> overflow
-
-
Method Detail
-
nextUserData
long nextUserData()
-
nextUserDataSlow
private long nextUserDataSlow()
-
register
PendingZeroCopyWrites.PendingWrite register(long userData)
-
registerOverflow
private PendingZeroCopyWrites.PendingWrite registerOverflow(long userData)
-
release
void release(long userData)
-
recycle
void recycle(long userData)
-
-