protected static class SafeSortedMap.EntryNode extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
SafeSortedMap.EntryNode.MapEntry
A Map.Entry view of the EntryNode.
|
Modifier and Type | Field and Description |
---|---|
protected static AtomicReferenceFieldUpdater |
m_atomicUpdaterNext
AtomicUpdater for the casNext operation.
|
protected static AtomicReferenceFieldUpdater |
m_atomicUpdaterValue
AtomicUpdater for the casValue operation.
|
protected SafeSortedMap.EntryNode |
m_nodeNext
The next SkipNode in the list.
|
protected Object |
m_oKey
The key represented by this Node.
|
protected Object |
m_oValue
The value represented by this EntryNode.
|
Modifier | Constructor and Description |
---|---|
protected |
EntryNode(Object oKey,
Object oValue)
Construct an EntryNode for the specified key and value.
|
protected |
EntryNode(Object oKey,
Object oValue,
SafeSortedMap.EntryNode nodeNext)
Construct an EntryNode for the specified key, value and next node.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
casNext(Object nodeAssume,
Object nodeNext)
Atomically set the next EntryNode to the specified node iff the current
next EntryNode matches the expected node.
|
protected boolean |
casValue(Object oValueAssume,
Object oValueNew)
Atomically set the value of this EntryNode to the specified value iff
the current value matches the assumed value.
|
Object |
getKey()
Return the key that this node represents.
|
protected SafeSortedMap.EntryNode.MapEntry |
getMapEntry()
Return a MapEntry view of this EntryNode, suitable for returning to
the EntrySet iterator.
|
protected SafeSortedMap.EntryNode |
getNext()
Return the next EntryNode in the entry list.
|
Object |
getValue()
Return the value that this node represents.
|
protected Object |
getValueInternal()
Return the value associated with the Map entry (could be NO_VALUE).
|
void |
helpDelete(SafeSortedMap.EntryNode nodePrev,
SafeSortedMap.EntryNode nodeNext)
Called when a deleted EntryNode is encountered during a map traversal
to help the deletion process complete.
|
boolean |
isDeleted()
Return true iff this EntryNode has been deleted.
|
boolean |
markForDelete(SafeSortedMap.EntryNode nodeNext)
Attempt to mark this EntryNode for deletion by appending a delete
marker to follow this EntryNode, assuming that the expected nex
EntryNode is the next.
|
protected void |
setNext(SafeSortedMap.EntryNode nodeNext)
Set the next EntryNode in the entry list.
|
String |
toString()
Return a String representation of the SkipNode.
|
protected static final AtomicReferenceFieldUpdater m_atomicUpdaterNext
protected static final AtomicReferenceFieldUpdater m_atomicUpdaterValue
protected final Object m_oKey
protected volatile Object m_oValue
protected volatile SafeSortedMap.EntryNode m_nodeNext
protected EntryNode(Object oKey, Object oValue)
oKey
- the key that this EntryNode representsoValue
- the value that this EntryNode representsprotected EntryNode(Object oKey, Object oValue, SafeSortedMap.EntryNode nodeNext)
oKey
- the key that this EntryNode representsoValue
- the value that this EntryNode representsnodeNext
- the node to set as the "next" nodepublic boolean isDeleted()
public boolean markForDelete(SafeSortedMap.EntryNode nodeNext)
nodeNext
- the expected "next" EntryNodepublic void helpDelete(SafeSortedMap.EntryNode nodePrev, SafeSortedMap.EntryNode nodeNext)
nodePrev
- the assumed predecessor to this EntryNodenodeNext
- the assumed successor to this EntryNodepublic Object getKey()
public Object getValue()
protected boolean casValue(Object oValueAssume, Object oValueNew)
oValueAssume
- the assumed valueoValueNew
- the new valueprotected SafeSortedMap.EntryNode.MapEntry getMapEntry()
public String toString()
protected Object getValueInternal()
protected SafeSortedMap.EntryNode getNext()
protected void setNext(SafeSortedMap.EntryNode nodeNext)
nodeNext
- the next EntryNode in the entry listprotected boolean casNext(Object nodeAssume, Object nodeNext)
nodeAssume
- the assumed "next" EntryNodenodeNext
- the new "next" EntryNode