static final class LinkedTransferQueue.Node
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
isData |
(package private) java.lang.Object |
item |
private static long |
itemOffset |
(package private) LinkedTransferQueue.Node |
next |
private static long |
nextOffset |
private static long |
serialVersionUID |
private static sun.misc.Unsafe |
UNSAFE |
(package private) java.lang.Thread |
waiter |
private static long |
waiterOffset |
Constructor and Description |
---|
Node(java.lang.Object item,
boolean isData)
Constructs a new node.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
cannotPrecede(boolean haveData)
Returns true if a node with the given mode cannot be
appended to this node because this node is unmatched and
has opposite data mode.
|
(package private) boolean |
casItem(java.lang.Object cmp,
java.lang.Object val) |
(package private) boolean |
casNext(LinkedTransferQueue.Node cmp,
LinkedTransferQueue.Node val) |
(package private) void |
forgetContents()
Sets item to self and waiter to null, to avoid garbage
retention after matching or cancelling.
|
(package private) void |
forgetNext()
Links node to itself to avoid garbage retention.
|
(package private) boolean |
isMatched()
Returns true if this node has been matched, including the
case of artificial matches due to cancellation.
|
(package private) boolean |
isUnmatchedRequest()
Returns true if this is an unmatched request node.
|
(package private) boolean |
tryMatchData()
Tries to artificially match a data node -- used by remove.
|
final boolean isData
volatile java.lang.Object item
volatile LinkedTransferQueue.Node next
volatile java.lang.Thread waiter
private static final long serialVersionUID
private static final sun.misc.Unsafe UNSAFE
private static final long itemOffset
private static final long nextOffset
private static final long waiterOffset
Node(java.lang.Object item, boolean isData)
final boolean casNext(LinkedTransferQueue.Node cmp, LinkedTransferQueue.Node val)
final boolean casItem(java.lang.Object cmp, java.lang.Object val)
final void forgetNext()
final void forgetContents()
final boolean isMatched()
final boolean isUnmatchedRequest()
final boolean cannotPrecede(boolean haveData)
final boolean tryMatchData()