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

Method newEntry

corpus/java/training/guava/cache/LocalCache.java:1816–1825  ·  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

1814 * This method is a convenience for testing. Code should call {@link Segment#newEntry} directly.
1815 */
1816 @VisibleForTesting
1817 ReferenceEntry<K, V> newEntry(K key, int hash, @Nullable ReferenceEntry<K, V> next) {
1818 Segment<K, V> segment = segmentFor(hash);
1819 segment.lock();
1820 try {
1821 return segment.newEntry(key, hash, next);
1822 } finally {
1823 segment.unlock();
1824 }
1825 }
1826
1827 /**
1828 * This method is a convenience for testing. Code should call {@link Segment#copyEntry} directly.

Callers 1

newEntryMethod · 0.45

Calls 3

segmentForMethod · 0.95
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected