This method is a convenience for testing. Code should call Segment#newEntry directly.
(K key, int hash, @Nullable ReferenceEntry<K, V> next)
| 1874 | */ |
| 1875 | |
| 1876 | @VisibleForTesting |
| 1877 | ReferenceEntry<K, V> newEntry(K key, int hash, @Nullable ReferenceEntry<K, V> next) { |
| 1878 | Segment<K, V> segment = segmentFor(hash); |
| 1879 | segment.lock(); |
| 1880 | try { |
| 1881 | return segment.newEntry(key, hash, next); |
| 1882 | } finally { |
| 1883 | segment.unlock(); |
| 1884 | } |
| 1885 | } |
| 1886 | |
| 1887 | /** |
| 1888 | * This method is a convenience for testing. Code should call {@link Segment#copyEntry} directly. |
no test coverage detected