Class LinkedTransferQueue.QNode

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    LinkedTransferQueue<E>

    private static final class LinkedTransferQueue.QNode
    extends java.util.concurrent.atomic.AtomicReference<java.lang.Object>
    Node class for LinkedTransferQueue. Opportunistically subclasses from AtomicReference to represent item. Uses Object, not E, to allow setting item to "this" after use, to avoid garbage retention. Similarly, setting the next field to this is used as sentinel that node is off list.