Class 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.