org.codehaus.gpars

groovyx.gpars.extra166y
[Java] Interface CustomConcurrentHashMap.Node

Reclaimable
  groovyx.gpars.extra166y.CustomConcurrentHashMap.Node
All Superinterfaces:
Reclaimable

static interface CustomConcurrentHashMap.Node
extends 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 java.lang.ref.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()

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(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.

 

Method Detail

get

public java.lang.Object get()


getLinkage

public 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


getLocator

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


getValue

public 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.
throws:
RuntimeException or Error if computeValue failed
Returns:
the value


setLinkage

public void setLinkage(Node linkage)
Records the linkage to be returned by the next call to getLinkage.
Parameters:
linkage - the linkage


setValue

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


 

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