static final class ConcurrentSkipListMap.Node<K,V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) K |
key |
(package private) ConcurrentSkipListMap.Node<K,V> |
next |
(package private) static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,ConcurrentSkipListMap.Node> |
nextUpdater
Updater for casNext
|
(package private) java.lang.Object |
value |
(package private) static java.util.concurrent.atomic.AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,java.lang.Object> |
valueUpdater |
| Constructor and Description |
|---|
Node(ConcurrentSkipListMap.Node<K,V> next)
Creates a new marker node.
|
Node(K key,
java.lang.Object value,
ConcurrentSkipListMap.Node<K,V> next)
Creates a new regular node.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
appendMarker(ConcurrentSkipListMap.Node<K,V> f)
Tries to append a deletion marker to this node.
|
(package private) boolean |
casNext(ConcurrentSkipListMap.Node<K,V> cmp,
ConcurrentSkipListMap.Node<K,V> val)
compareAndSet next field
|
(package private) boolean |
casValue(java.lang.Object cmp,
java.lang.Object val)
compareAndSet value field
|
(package private) ConcurrentSkipListMap.SnapshotEntry<K,V> |
createSnapshot()
Create and return a new SnapshotEntry holding current
mapping if this node holds a valid value, else null
|
(package private) V |
getValidValue()
Return value if this node contains a valid key-value pair,
else null.
|
(package private) void |
helpDelete(ConcurrentSkipListMap.Node<K,V> b,
ConcurrentSkipListMap.Node<K,V> f)
Helps out a deletion by appending marker or unlinking from
predecessor.
|
(package private) boolean |
isBaseHeader()
Return true if this node is the header of base-level list.
|
(package private) boolean |
isMarker()
Return true if this node is a marker.
|
final K key
volatile java.lang.Object value
volatile ConcurrentSkipListMap.Node<K,V> next
static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,ConcurrentSkipListMap.Node> nextUpdater
static final java.util.concurrent.atomic.AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,java.lang.Object> valueUpdater
Node(K key, java.lang.Object value, ConcurrentSkipListMap.Node<K,V> next)
Node(ConcurrentSkipListMap.Node<K,V> next)
boolean casValue(java.lang.Object cmp,
java.lang.Object val)
boolean casNext(ConcurrentSkipListMap.Node<K,V> cmp, ConcurrentSkipListMap.Node<K,V> val)
boolean isMarker()
n - a possibly null reference to a nodeboolean isBaseHeader()
boolean appendMarker(ConcurrentSkipListMap.Node<K,V> f)
f - the assumed current successor of this nodevoid helpDelete(ConcurrentSkipListMap.Node<K,V> b, ConcurrentSkipListMap.Node<K,V> f)
b - predecessorf - successorV getValidValue()
ConcurrentSkipListMap.SnapshotEntry<K,V> createSnapshot()