- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 58 for putIfAbsent (0.12 seconds)
-
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/SmartProjectComparator.java
} // Calculate weight without using computeIfAbsent to avoid recursive update issues long weight = calculateWeight(project); // Use putIfAbsent to handle concurrent access safely Long previousWeight = projectWeights.putIfAbsent(project, weight); return previousWeight != null ? previousWeight : weight; } private Comparator<MavenProject> createComparator() {Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Wed Aug 06 12:03:40 GMT 2025 - 4.6K bytes - Click Count (0) -
guava/src/com/google/common/cache/LoadingCache.java
* * <p>Caches loaded by a {@link CacheLoader} will call {@link CacheLoader#load} to load new values * into the cache. Newly loaded values are added to the cache using {@code * Cache.asMap().putIfAbsent} after loading has completed; if another value was associated with * {@code key} while the new value was loading then a removal notification will be sent for the * new value. *Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 12:40:22 GMT 2026 - 8.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java
Entry<Object, Object> entry = warmed.get(i - WARMUP_MIN); Object newValue = new Object(); assertThat(cache.asMap().putIfAbsent(entry.getKey(), newValue)) .isSameInstanceAs(entry.getValue()); Object newKey = new Object(); assertThat(cache.asMap().putIfAbsent(newKey, entry.getValue())).isNull(); // this getUnchecked() call shouldn't be a cache miss; verified below
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 15.4K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/entity/ParamMap.java
@Override public void replaceAll(final BiFunction<? super K, ? super V, ? extends V> function) { parent.replaceAll(function); } @Override public V putIfAbsent(final K key, final V value) { return parent.putIfAbsent(key, value); } @Override public boolean remove(final Object key, final Object value) { if (parent.remove(key, value)) { return true;Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Jul 17 08:28:31 GMT 2025 - 5.8K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/BuildPlan.java
return node1; } private Map<String, MojoExecution> mergeMojos(Map<String, MojoExecution> l1, Map<String, MojoExecution> l2) { l2.forEach(l1::putIfAbsent); return l1; } // gather artifactIds which are not unique so that the respective thread names can be extended with the groupId public Set<String> duplicateIds() {Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Mar 28 12:11:25 GMT 2025 - 6.1K bytes - Click Count (0) -
api/maven-api-xml/src/main/java/org/apache/maven/api/xml/ImmutableCollections.java
@Override public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { throw uoe(); } @Override public V putIfAbsent(K key, V value) { throw uoe(); } @Override public boolean remove(Object key, Object value) { throw uoe(); } @OverrideCreated: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Mon Jul 07 11:47:42 GMT 2025 - 7.8K bytes - Click Count (0) -
src/main/java/org/codelibs/core/collection/CollectionsUtil.java
* @see ConcurrentHashMap#putIfAbsent(Object, Object) */ public static <K, V> V putIfAbsent(final ConcurrentMap<K, V> map, final K key, final V value) { final V exists = map.putIfAbsent(key, value); if (exists != null) { return exists; } return value; }Created: Fri Apr 03 20:58:12 GMT 2026 - Last Modified: Thu Jul 31 08:16:49 GMT 2025 - 49.9K bytes - Click Count (0) -
guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 12:40:22 GMT 2026 - 21.6K bytes - Click Count (0) -
guava/src/com/google/common/collect/Synchronized.java
synchronized (mutex) { return delegate().put(key, value); } } @Override public @Nullable V putIfAbsent(K key, V value) { synchronized (mutex) { return delegate().putIfAbsent(key, value); } } @Override public boolean replace(K key, V oldValue, V newValue) { synchronized (mutex) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Aug 08 15:11:10 GMT 2025 - 56.9K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java
for (int i = 0; i < ITERATIONS; i++) { long before = map.get(key); long result = map.putIfAbsent(key, newValue); long after = map.get(key); assertEquals(before, result); assertEquals(before == 0 ? newValue : before, after); map.remove(key); before = map.get(key); result = map.putIfAbsent(key, newValue); after = map.get(key); assertEquals(0, before);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 17.5K bytes - Click Count (0)