10 |
|
/** |
11 |
|
* A linked list node supporting atomic operations on both item and |
12 |
|
* next fields, Used by non-blocking linked-list based classes. |
13 |
+ |
* @since 1.5 |
14 |
+ |
* @author Doug Lea |
15 |
|
*/ |
16 |
|
|
17 |
|
final class AtomicLinkedNode { |
18 |
|
private volatile Object item; |
19 |
|
private volatile AtomicLinkedNode next; |
20 |
|
|
21 |
< |
private final static AtomicReferenceFieldUpdater<AtomicLinkedNode, AtomicLinkedNode> nextUpdater = |
21 |
> |
private static final AtomicReferenceFieldUpdater<AtomicLinkedNode, AtomicLinkedNode> nextUpdater = |
22 |
|
new AtomicReferenceFieldUpdater<AtomicLinkedNode, AtomicLinkedNode>(new AtomicLinkedNode[0], new AtomicLinkedNode[0], "next"); |
23 |
< |
private final static AtomicReferenceFieldUpdater<AtomicLinkedNode, Object> itemUpdater |
23 |
> |
private static final AtomicReferenceFieldUpdater<AtomicLinkedNode, Object> itemUpdater |
24 |
|
= new AtomicReferenceFieldUpdater<AtomicLinkedNode, Object>(new AtomicLinkedNode[0], new Object[0], "item"); |
25 |
|
|
26 |
|
AtomicLinkedNode(Object x) { item = x; } |