|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.core.util.backport.java.util.concurrent.ConcurrentSkipListMap.Node
static final class ConcurrentSkipListMap.Node
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) Object |
key
|
(package private) ConcurrentSkipListMap.Node |
next
|
(package private) Object |
value
|
| Constructor Summary | |
|---|---|
ConcurrentSkipListMap.Node(ConcurrentSkipListMap.Node next)
Creates a new marker node. |
|
ConcurrentSkipListMap.Node(Object key,
Object value,
ConcurrentSkipListMap.Node next)
Creates a new regular node. |
|
| Method Summary | |
|---|---|
(package private) boolean |
appendMarker(ConcurrentSkipListMap.Node f)
Tries to append a deletion marker to this node. |
(package private) boolean |
casNext(ConcurrentSkipListMap.Node cmp,
ConcurrentSkipListMap.Node val)
compareAndSet next field |
(package private) boolean |
casValue(Object cmp,
Object val)
compareAndSet value field |
(package private) AbstractMap.SimpleImmutableEntry |
createSnapshot()
Creates and returns a new SimpleImmutableEntry holding current mapping if this node holds a valid value, else null. |
(package private) Object |
getValidValue()
Returns value if this node contains a valid key-value pair, else null. |
(package private) void |
helpDelete(ConcurrentSkipListMap.Node b,
ConcurrentSkipListMap.Node 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 Object key
volatile Object value
volatile ConcurrentSkipListMap.Node next
| Constructor Detail |
|---|
ConcurrentSkipListMap.Node(Object key,
Object value,
ConcurrentSkipListMap.Node next)
ConcurrentSkipListMap.Node(ConcurrentSkipListMap.Node next)
| Method Detail |
|---|
boolean casValue(Object cmp,
Object val)
boolean casNext(ConcurrentSkipListMap.Node cmp,
ConcurrentSkipListMap.Node val)
boolean isMarker()
n - a possibly null reference to a node
boolean isBaseHeader()
boolean appendMarker(ConcurrentSkipListMap.Node f)
f - the assumed current successor of this node
void helpDelete(ConcurrentSkipListMap.Node b,
ConcurrentSkipListMap.Node f)
b - predecessorf - successorObject getValidValue()
AbstractMap.SimpleImmutableEntry createSnapshot()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||