|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.beanlib.util.concurrent.ConcurrentSkipListMap.Node<K,V>
static final class ConcurrentSkipListMap.Node<K,V>
Nodes hold keys and values, and are singly linked in sorted order, possibly with some intervening marker nodes. The list is headed by a dummy node accessible as head.node. The value field is declared only as Object because it takes special non-V values for marker and header nodes.
Field Summary | |
---|---|
(package private) K |
key
|
(package private) ConcurrentSkipListMap.Node<K,V> |
next
|
(package private) static AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,ConcurrentSkipListMap.Node> |
nextUpdater
Updater for casNext |
(package private) Object |
value
|
(package private) static AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,Object> |
valueUpdater
Updater for casValue |
Constructor Summary | |
---|---|
ConcurrentSkipListMap.Node(ConcurrentSkipListMap.Node<K,V> next)
Creates a new marker node. |
|
ConcurrentSkipListMap.Node(K key,
Object value,
ConcurrentSkipListMap.Node<K,V> next)
Creates a new regular node. |
Method Summary | |
---|---|
(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(Object cmp,
Object val)
compareAndSet value field |
(package private) AbstractMap.SimpleImmutableEntry<K,V> |
createSnapshot()
Creates and returns a new SimpleImmutableEntry holding current mapping if this node holds a valid value, else null. |
(package private) V |
getValidValue()
Returns 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()
Returns true if this node is the header of base-level list. |
(package private) boolean |
isMarker()
Returns true if this node is a marker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final K key
volatile Object value
volatile ConcurrentSkipListMap.Node<K,V> next
static final AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,ConcurrentSkipListMap.Node> nextUpdater
static final AtomicReferenceFieldUpdater<ConcurrentSkipListMap.Node,Object> valueUpdater
Constructor Detail |
---|
ConcurrentSkipListMap.Node(K key, Object value, ConcurrentSkipListMap.Node<K,V> next)
ConcurrentSkipListMap.Node(ConcurrentSkipListMap.Node<K,V> next)
Method Detail |
---|
boolean casValue(Object cmp, Object val)
boolean casNext(ConcurrentSkipListMap.Node<K,V> cmp, ConcurrentSkipListMap.Node<K,V> val)
boolean isMarker()
boolean isBaseHeader()
boolean appendMarker(ConcurrentSkipListMap.Node<K,V> f)
f
- the assumed current successor of this node
void helpDelete(ConcurrentSkipListMap.Node<K,V> b, ConcurrentSkipListMap.Node<K,V> f)
b
- predecessorf
- successorV getValidValue()
AbstractMap.SimpleImmutableEntry<K,V> createSnapshot()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |