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

Method newEntry

output/java_guava/1.4.13/LocalCache.java:1876–1885  ·  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

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.

Callers 1

newEntryMethod · 0.45

Calls 3

segmentForMethod · 0.45
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected