Creates a Striped with eagerly initialized, strongly referenced locks. Every lock is reentrant. @param stripes the minimum number of stripes (locks) required @return a new Striped
(int stripes)
| 206 | |
| 207 | |
| 208 | public static Striped<Lock> lock(int stripes) { |
| 209 | return new CompactStriped<Lock>(stripes, new Supplier<Lock>() { |
| 210 | @Override |
| 211 | public Lock get() { |
| 212 | return new PaddedLock(); |
| 213 | } |
| 214 | }); |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Creates a {@code Striped<Lock>} with lazily initialized, weakly referenced locks. Every lock is |
no outgoing calls
no test coverage detected