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

Method newEntry

output/java_guava/1.4.19/LocalCache.java:1883–1892  ·  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

1881 */
1882
1883 @VisibleForTesting
1884 ReferenceEntry<K, V> newEntry(K key, int hash, @Nullable ReferenceEntry<K, V> next) {
1885 Segment<K, V> segment = segmentFor(hash);
1886 segment.lock();
1887 try {
1888 return segment.newEntry(key, hash, next);
1889 } finally {
1890 segment.unlock();
1891 }
1892 }
1893
1894 /**
1895 * 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