- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for guardByKey (0.18 sec)
-
platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/ProducerGuard.java
* @return the value returned by the factory */ public abstract <V> V guardByKey(T key, Supplier<V> supplier); private static class AdaptiveProducerGuard<T> extends ProducerGuard<T> { private final Set<T> producing = new HashSet<>(); @Override public <V> V guardByKey(T key, Supplier<V> supplier) { synchronized (producing) { while (!producing.add(key)) {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 26 16:02:31 UTC 2024 - 4.7K bytes - Viewed (0) -
platforms/core-execution/snapshots/src/main/java/org/gradle/internal/vfs/impl/DefaultFileSystemAccess.java
case Directory: return Optional.empty(); case RegularFile: return Optional.of(producingSnapshots.guardByKey(location, () -> virtualFileSystem.findSnapshot(location) .orElseGet(() -> {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 26 16:02:35 UTC 2024 - 11.1K bytes - Viewed (0) -
platforms/extensibility/unit-test-fixtures/src/main/java/org/gradle/testfixtures/internal/TestInMemoryIndexedCache.java
throw UncheckedException.throwAsUncheckedException(e); } } @Override public V get(final K key, final Function<? super K, ? extends V> producer) { return producerGuard.guardByKey(key, () -> { if (!entries.containsKey(key)) { put(key, producer.apply(key)); } return TestInMemoryIndexedCache.this.getIfPresent(key); }); }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon May 13 21:54:27 UTC 2024 - 3.1K bytes - Viewed (0)