static interface CustomConcurrentHashMap.Node extends CustomConcurrentHashMap.Reclaimable
Reference
or other classes, so a base
class cannot be established.)
This interface uses raw types as the lesser of evils.
Otherwise we'd encounter almost as many unchecked casts when
nodes are used across sets, etc.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get()
Returns the key established during the creation of this node.
|
CustomConcurrentHashMap.Node |
getLinkage()
Returns the linkage established during the creation of this
node or, if since updated, the linkage set by the most
recent call to setLinkage.
|
int |
getLocator()
Returns the locator established during the creation of this node.
|
java.lang.Object |
getValue()
Returns the value established during the creation of this
node or, if since updated, the value set by the most
recent call to setValue, or throws an exception if
value could not be computed.
|
void |
setLinkage(CustomConcurrentHashMap.Node linkage)
Records the linkage to be returned by the next call to getLinkage.
|
void |
setValue(java.lang.Object value)
Nodes the value to be returned by the next call to getValue.
|
onReclamation
java.lang.Object get()
int getLocator()
java.lang.Object getValue()
java.lang.RuntimeException
- or Error if computeValue failedvoid setValue(java.lang.Object value)
value
- the valueCustomConcurrentHashMap.Node getLinkage()
void setLinkage(CustomConcurrentHashMap.Node linkage)
linkage
- the linkage