groovyx.gpars.extra166y
Interface CustomConcurrentHashMap.Node

All Superinterfaces:
CustomConcurrentHashMap.Reclaimable
All Known Implementing Classes:
CustomConcurrentHashMap.IntKeyIntValueNode, CustomConcurrentHashMap.IntKeyNode, CustomConcurrentHashMap.IntKeySelfValueNode, CustomConcurrentHashMap.IntKeySoftValueNode, CustomConcurrentHashMap.IntKeyStrongValueNode, CustomConcurrentHashMap.IntKeyWeakValueNode, CustomConcurrentHashMap.LinkedIntKeyIntValueNode, CustomConcurrentHashMap.LinkedIntKeySelfValueNode, CustomConcurrentHashMap.LinkedIntKeySoftValueNode, CustomConcurrentHashMap.LinkedIntKeyStrongValueNode, CustomConcurrentHashMap.LinkedIntKeyWeakValueNode, CustomConcurrentHashMap.LinkedSoftKeyIntValueNode, CustomConcurrentHashMap.LinkedSoftKeySelfValueNode, CustomConcurrentHashMap.LinkedSoftKeySoftValueNode, CustomConcurrentHashMap.LinkedSoftKeyStrongValueNode, CustomConcurrentHashMap.LinkedSoftKeyWeakValueNode, CustomConcurrentHashMap.LinkedStrongKeyIntValueNode, CustomConcurrentHashMap.LinkedStrongKeySelfValueNode, CustomConcurrentHashMap.LinkedStrongKeySoftValueNode, CustomConcurrentHashMap.LinkedStrongKeyStrongValueNode, CustomConcurrentHashMap.LinkedStrongKeyWeakValueNode, CustomConcurrentHashMap.LinkedWeakKeyIntValueNode, CustomConcurrentHashMap.LinkedWeakKeySelfValueNode, CustomConcurrentHashMap.LinkedWeakKeySoftValueNode, CustomConcurrentHashMap.LinkedWeakKeyStrongValueNode, CustomConcurrentHashMap.LinkedWeakKeyWeakValueNode, CustomConcurrentHashMap.SoftKeyIntValueNode, CustomConcurrentHashMap.SoftKeyNode, CustomConcurrentHashMap.SoftKeySelfValueNode, CustomConcurrentHashMap.SoftKeySoftValueNode, CustomConcurrentHashMap.SoftKeyStrongValueNode, CustomConcurrentHashMap.SoftKeyWeakValueNode, CustomConcurrentHashMap.StrongKeyIntValueNode, CustomConcurrentHashMap.StrongKeyNode, CustomConcurrentHashMap.StrongKeySelfValueNode, CustomConcurrentHashMap.StrongKeySoftValueNode, CustomConcurrentHashMap.StrongKeyStrongValueNode, CustomConcurrentHashMap.StrongKeyWeakValueNode, CustomConcurrentHashMap.TerminalIntKeyIntValueNode, CustomConcurrentHashMap.TerminalIntKeySelfValueNode, CustomConcurrentHashMap.TerminalIntKeySoftValueNode, CustomConcurrentHashMap.TerminalIntKeyStrongValueNode, CustomConcurrentHashMap.TerminalIntKeyWeakValueNode, CustomConcurrentHashMap.TerminalSoftKeyIntValueNode, CustomConcurrentHashMap.TerminalSoftKeySelfValueNode, CustomConcurrentHashMap.TerminalSoftKeySoftValueNode, CustomConcurrentHashMap.TerminalSoftKeyStrongValueNode, CustomConcurrentHashMap.TerminalSoftKeyWeakValueNode, CustomConcurrentHashMap.TerminalStrongKeyIntValueNode, CustomConcurrentHashMap.TerminalStrongKeySelfValueNode, CustomConcurrentHashMap.TerminalStrongKeySoftValueNode, CustomConcurrentHashMap.TerminalStrongKeyStrongValueNode, CustomConcurrentHashMap.TerminalStrongKeyWeakValueNode, CustomConcurrentHashMap.TerminalWeakKeyIntValueNode, CustomConcurrentHashMap.TerminalWeakKeySelfValueNode, CustomConcurrentHashMap.TerminalWeakKeySoftValueNode, CustomConcurrentHashMap.TerminalWeakKeyStrongValueNode, CustomConcurrentHashMap.TerminalWeakKeyWeakValueNode, CustomConcurrentHashMap.WeakKeyIntValueNode, CustomConcurrentHashMap.WeakKeyNode, CustomConcurrentHashMap.WeakKeySelfValueNode, CustomConcurrentHashMap.WeakKeySoftValueNode, CustomConcurrentHashMap.WeakKeyStrongValueNode, CustomConcurrentHashMap.WeakKeyWeakValueNode
Enclosing class:
CustomConcurrentHashMap<K,V>

static interface CustomConcurrentHashMap.Node
extends CustomConcurrentHashMap.Reclaimable

An object maintaining a key-value mapping. Nodes provide methods that are intended to used only by the map creating the node. This includes methods used solely for internal bookkeeping by maps, that must be treating opaquely by implementation classes. (This requirement stems from the fact that concrete implementations may be required to subclass 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.


Method Summary
 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 r)
          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.
 
Methods inherited from interface groovyx.gpars.extra166y.CustomConcurrentHashMap.Reclaimable
onReclamation
 

Method Detail

get

java.lang.Object get()
Returns the key established during the creation of this node. Note: This method is named "get" rather than "getKey" to simplify usage of Reference keys.

Returns:
the key

getLocator

int getLocator()
Returns the locator established during the creation of this node.

Returns:
the locator

getValue

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

Returns:
the value
Throws:
java.lang.RuntimeException - or Error if computeValue failed

setValue

void setValue(java.lang.Object value)
Nodes the value to be returned by the next call to getValue.

Parameters:
value - the value

getLinkage

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.

Returns:
the linkage

setLinkage

void setLinkage(CustomConcurrentHashMap.Node r)
Records the linkage to be returned by the next call to getLinkage.

Parameters:
linkage - the linkage

Copyright © 2008–2012 Václav Pech. All Rights Reserved.