MCPcopy Create free account
hub / github.com/antlr/codebuff / newEntry

Method newEntry

output/java_guava/1.4.16/LocalCache.java:1882–1891  ·  view source on GitHub ↗

This method is a convenience for testing. Code should call Segment#newEntry directly.

(K key, int hash, @Nullable ReferenceEntry<K, V> next)

Source from the content-addressed store, hash-verified

1880 */
1881
1882 @VisibleForTesting
1883 ReferenceEntry<K, V> newEntry(K key, int hash, @Nullable ReferenceEntry<K, V> next) {
1884 Segment<K, V> segment = segmentFor(hash);
1885 segment.lock();
1886 try {
1887 return segment.newEntry(key, hash, next);
1888 } finally {
1889 segment.unlock();
1890 }
1891 }
1892
1893 /**
1894 * This method is a convenience for testing. Code should call {@link Segment#copyEntry} directly.

Callers 2

newEntryMethod · 0.45
getOrComputeMethod · 0.45

Calls 3

segmentForMethod · 0.95
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected