Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for decrementAndGet (0.09 seconds)

  1. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

        assertEquals(0L, map.get(key));
        assertFalse(map.containsKey(key));
    
        assertEquals(-1L, map.decrementAndGet(key));
        assertEquals(-1L, map.get(key));
    
        assertEquals(0L, map.incrementAndGet(key));
        assertEquals(0L, map.get(key));
        assertTrue(map.containsKey(key));
    
        assertEquals(-1L, map.decrementAndGet(key));
        assertEquals(-1L, map.get(key));
      }
    
      public void testGetAndDecrement() {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 17.5K bytes
    - Click Count (0)
  2. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

          seenExceptionsUpdater.compareAndSet(state, expect, update);
        }
    
        @Override
        int decrementAndGetRemainingCount(AggregateFutureState<?> state) {
          return remainingCountUpdater.decrementAndGet(state);
        }
    
        @Override
        String atomicHelperTypeForTest() {
          return "SafeAtomicHelper";
        }
      }
    
      private static final class SynchronizedAtomicHelper extends AtomicHelper {
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 8.5K bytes
    - Click Count (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt

            if (finishedCall != null) {
              check(runningSyncCalls.remove(finishedCall)) { "Call wasn't in-flight!" }
            }
    
            if (finishedAsyncCall != null) {
              finishedAsyncCall.callsPerHost.decrementAndGet()
              check(runningAsyncCalls.remove(finishedAsyncCall)) { "Call wasn't in-flight!" }
            }
    
            if (enqueuedCall != null) {
              readyAsyncCalls.add(enqueuedCall)
    
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Oct 07 14:16:22 GMT 2025
    - 9.9K bytes
    - Click Count (0)
  4. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

        return addAndGet(key, 1);
      }
    
      /**
       * Decrements by one the value currently associated with {@code key}, and returns the new value.
       */
      @CanIgnoreReturnValue
      public long decrementAndGet(K key) {
        return addAndGet(key, -1);
      }
    
      /**
       * Adds {@code delta} to the value currently associated with {@code key}, and returns the new
       * value.
       */
      @CanIgnoreReturnValue
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Fri Oct 10 23:13:45 GMT 2025
    - 11.7K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        removeFromReplica(replica, replicatedMaxValue);
      }
    
      private static void removeFromReplica(Map<Integer, AtomicInteger> replica, int value) {
        AtomicInteger numOccur = replica.get(value);
        if (numOccur.decrementAndGet() == 0) {
          replica.remove(value);
        }
      }
    
      private static void assertIntact(MinMaxPriorityQueue<?> q) {
        if (!q.isIntact()) {
          fail("State " + Arrays.toString(q.toArray()));
        }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Oct 28 16:03:47 GMT 2025
    - 36.1K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/util/concurrent/Futures.java

          delegateIndex = delegates.size();
        }
    
        @SuppressWarnings("Interruption") // We are propagating an interrupt from a caller.
        private void recordCompletion() {
          if (incompleteOutputCount.decrementAndGet() == 0 && wasCancelled) {
            for (ListenableFuture<? extends T> toCancel : inputFutures) {
              if (toCancel != null) {
                toCancel.cancel(shouldInterrupt);
              }
            }
          }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 64.3K bytes
    - Click Count (0)
Back to Top