320 |
|
* Returns the value established during the creation of this |
321 |
|
* node or, if since updated, the value set by the most |
322 |
|
* recent call to setValue, or throws an exception if |
323 |
< |
* value could not be computed |
323 |
> |
* value could not be computed. |
324 |
|
* @return the value |
325 |
|
* @throws RuntimeException or Error if computeValue failed |
326 |
|
*/ |
544 |
|
} |
545 |
|
|
546 |
|
/** |
547 |
< |
* Creates a new CustomConcurrentHashMap with the given parameters |
547 |
> |
* Creates a new CustomConcurrentHashMap with the given parameters. |
548 |
|
* @param keyStrength the strength for keys |
549 |
|
* @param keyEquivalence the Equivalence to use for keys |
550 |
|
* @param valueStrength the strength for values |
573 |
|
|
574 |
|
/** |
575 |
|
* Returns a new map using Integer keys and the given value |
576 |
< |
* parameters |
576 |
> |
* parameters. |
577 |
|
* @param valueStrength the strength for values |
578 |
|
* @param valueEquivalence the Equivalence to use for values |
579 |
|
* @param expectedSize an estimate of the number of elements |
591 |
|
} |
592 |
|
|
593 |
|
/** |
594 |
< |
* Returns a new map using the given key parameters and Integer values |
594 |
> |
* Returns a new map using the given key parameters and Integer values. |
595 |
|
* @param keyStrength the strength for keys |
596 |
|
* @param keyEquivalence the Equivalence to use for keys |
597 |
|
* @param expectedSize an estimate of the number of elements |
609 |
|
} |
610 |
|
|
611 |
|
/** |
612 |
< |
* Returns a new map using Integer keys and values |
612 |
> |
* Returns a new map using Integer keys and values. |
613 |
|
* @param expectedSize an estimate of the number of elements |
614 |
|
* that will be held in the map. If no estimate is known, |
615 |
|
* zero is an acceptable value. |
623 |
|
} |
624 |
|
|
625 |
|
/** |
626 |
< |
* Returns the segment for traversing table for key with given hash |
626 |
> |
* Returns the segment for traversing table for key with given hash. |
627 |
|
* @param hash the hash code for the key |
628 |
|
* @return the segment, or null if not yet initialized |
629 |
|
*/ |
656 |
|
} |
657 |
|
|
658 |
|
/** |
659 |
< |
* Returns node for key, or null if none |
659 |
> |
* Returns node for key, or null if none. |
660 |
|
*/ |
661 |
|
final Node findNode(Object key, int hash, Segment seg) { |
662 |
|
if (seg != null) { |
697 |
|
/** |
698 |
|
* Returns the value associated with a key equivalent to the given |
699 |
|
* key with respect to this map's key Equivalence, or {@code null} |
700 |
< |
* if no such mapping exists |
700 |
> |
* if no such mapping exists. |
701 |
|
* |
702 |
|
* @param key possible key |
703 |
|
* @return the value associated with the key or <tt>null</tt> if |
942 |
|
} |
943 |
|
|
944 |
|
/** |
945 |
< |
* Remove node if its key or value are null |
945 |
> |
* Removes node if its key or value are null. |
946 |
|
*/ |
947 |
|
final void removeIfReclaimed(Node r) { |
948 |
|
int hash = r.getLocator(); |
1600 |
|
final CustomConcurrentHashMap<K,K> cchm; |
1601 |
|
|
1602 |
|
/** |
1603 |
< |
* Creates a set with the given parameters |
1603 |
> |
* Creates a set with the given parameters. |
1604 |
|
* @param strength the strength of elements |
1605 |
|
* @param equivalence the Equivalence to use |
1606 |
|
* @param expectedSize an estimate of the number of elements |
1621 |
|
* exists, else adds and returns the given element. |
1622 |
|
* |
1623 |
|
* @param e the element |
1624 |
< |
* @return e, or an element equivalent to e. |
1624 |
> |
* @return e, or an element equivalent to e |
1625 |
|
*/ |
1626 |
|
public K intern(K e) { |
1627 |
|
K oldElement = cchm.doPut(e, e, true); |
3045 |
|
} |
3046 |
|
|
3047 |
|
// Fenced store into segment table array. Unneeded when we have Fences |
3048 |
< |
static final void storeNode(Node[] table, |
3049 |
< |
int i, Node r) { |
3048 |
> |
static final void storeNode(Node[] table, |
3049 |
> |
int i, Node r) { |
3050 |
|
long nodeOffset = ((long) i << tableShift) + tableBase; |
3051 |
|
UNSAFE.putOrderedObject(table, nodeOffset, r); |
3052 |
|
} |
3053 |
|
|
3054 |
< |
static final void storeSegment(Segment[] segs, |
3055 |
< |
int i, Segment s) { |
3054 |
> |
static final void storeSegment(Segment[] segs, |
3055 |
> |
int i, Segment s) { |
3056 |
|
long segmentOffset = ((long) i << segmentsShift) + segmentsBase; |
3057 |
|
UNSAFE.putOrderedObject(segs, segmentOffset, s); |
3058 |
|
} |