MCPcopy
hub / github.com/google/guava / lock

Method lock

guava/src/com/google/common/util/concurrent/Striped.java:208–210  ·  view source on GitHub ↗

Creates a {@code Striped<Lock>} with eagerly initialized, strongly referenced locks. Every lock is reentrant. @param stripes the minimum number of stripes (locks) required @return a new {@code Striped<Lock>}

(int stripes)

Source from the content-addressed store, hash-verified

206 * @return a new {@code Striped<Lock>}
207 */
208 public static Striped<Lock> lock(int stripes) {
209 return custom(stripes, PaddedLock::new);
210 }
211
212 /**
213 * Creates a {@code Striped<Lock>} with lazily initialized, weakly referenced locks. Every lock is

Callers 15

getMethod · 0.95
strongImplementationsMethod · 0.95
testSizesMethod · 0.95
newEntryMethod · 0.45
lockedGetOrLoadMethod · 0.45
computeMethod · 0.45
putMethod · 0.45
replaceMethod · 0.45
removeMethod · 0.45
storeLoadedValueMethod · 0.45
clearMethod · 0.45

Calls 1

customMethod · 0.95

Tested by 15

getMethod · 0.76
strongImplementationsMethod · 0.76
testSizesMethod · 0.76
lockAndUnlockMethod · 0.36
lockAndUnlockNestedMethod · 0.36
drainRecencyQueueMethod · 0.36
drainReferenceQueueMethod · 0.36
expireEntriesMethod · 0.36
testWeakReadWriteMethod · 0.36
runMethod · 0.36
awaitMethod · 0.36