665 |
|
// Hash-based segment and entry accesses |
666 |
|
|
667 |
|
/** |
668 |
< |
* Get the segment for the given hash |
668 |
> |
* Gets the segment for the given hash code. |
669 |
|
*/ |
670 |
|
@SuppressWarnings("unchecked") |
671 |
|
private Segment<K,V> segmentForHash(int h) { |
674 |
|
} |
675 |
|
|
676 |
|
/** |
677 |
< |
* Gets the table entry for the given segment and hash |
677 |
> |
* Gets the table entry for the given segment and hash code. |
678 |
|
*/ |
679 |
|
@SuppressWarnings("unchecked") |
680 |
|
static final <K,V> HashEntry<K,V> entryForHash(Segment<K,V> seg, int h) { |
1232 |
|
} |
1233 |
|
|
1234 |
|
/** |
1235 |
< |
* Set nextEntry to first node of next non-empty table |
1235 |
> |
* Sets nextEntry to first node of next non-empty table |
1236 |
|
* (in backwards order, to simplify checks). |
1237 |
|
*/ |
1238 |
|
final void advance() { |
1301 |
|
} |
1302 |
|
|
1303 |
|
/** |
1304 |
< |
* Set our entry's value and write through to the map. The |
1304 |
> |
* Sets our entry's value and writes through to the map. The |
1305 |
|
* value to return is somewhat arbitrary here. Since a |
1306 |
|
* WriteThroughEntry does not necessarily track asynchronous |
1307 |
|
* changes, the most recent "previous" value could be |
1397 |
|
/* ---------------- Serialization Support -------------- */ |
1398 |
|
|
1399 |
|
/** |
1400 |
< |
* Save the state of the <tt>ConcurrentHashMap</tt> instance to a |
1401 |
< |
* stream (i.e., serialize it). |
1400 |
> |
* Saves the state of the <tt>ConcurrentHashMap</tt> instance to a |
1401 |
> |
* stream (i.e., serializes it). |
1402 |
|
* @param s the stream |
1403 |
|
* @serialData |
1404 |
|
* the key (Object) and value (Object) |
1433 |
|
} |
1434 |
|
|
1435 |
|
/** |
1436 |
< |
* Reconstitute the <tt>ConcurrentHashMap</tt> instance from a |
1437 |
< |
* stream (i.e., deserialize it). |
1436 |
> |
* Reconstitutes the <tt>ConcurrentHashMap</tt> instance from a |
1437 |
> |
* stream (i.e., deserializes it). |
1438 |
|
* @param s the stream |
1439 |
|
*/ |
1440 |
|
@SuppressWarnings("unchecked") |