Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for decrementAndGet (0.09 sec)

  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() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

        // by executing on the same thread.
        if (executorService.isShutdown) {
          for (i in 0 until executableCalls.size) {
            val asyncCall = executableCalls[i]
            asyncCall.callsPerHost.decrementAndGet()
    
            this.withLock {
              runningAsyncCalls.remove(asyncCall)
            }
    
            asyncCall.failRejected()
          }
          idleCallback?.run()
        } else {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Jun 20 14:10:53 UTC 2024
    - 9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                          case 0:
                            map.incrementAndGet(key);
                            threadSum++;
                            break;
                          case 1:
                            map.decrementAndGet(key);
                            threadSum--;
                            break;
                          case 2:
                            map.addAndGet(key, delta);
                            threadSum += delta;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 13 14:28:25 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. fess-crawler/src/main/java/org/codelibs/fess/crawler/CrawlerContext.java

        }
    
        public long incrementAndGetAccessCount() {
            return accessCount.incrementAndGet();
        }
    
        public long decrementAndGetAccessCount() {
            return accessCount.decrementAndGet();
        }
    
        public CrawlerStatus getStatus() {
            return status;
        }
    
        public void setStatus(final CrawlerStatus status) {
            this.status = status;
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Sat Oct 12 01:40:57 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbFileHandleImpl.java

         * 
         * @throws SmbException
         *
         * @see jcifs.SmbFileHandle#release()
         */
        @Override
        public synchronized void release () throws CIFSException {
            long usage = this.usageCount.decrementAndGet();
            if ( usage == 0 ) {
                closeInternal(0L, false);
            }
            else if ( log.isTraceEnabled() ) {
                log.trace(String.format("Release %s (%d)", this, usage));
            }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 8.6K bytes
    - Viewed (1)
  6. src/main/java/jcifs/smb/SmbTreeHandleImpl.java

                this.treeConnection.acquire();
            }
            return this;
        }
    
    
        @Override
        public void release () {
            long us = this.usageCount.decrementAndGet();
            if ( us == 0 ) {
                this.treeConnection.release();
            }
            else if ( us < 0 ) {
                throw new RuntimeCIFSException("Usage count dropped below zero");
            }
        }
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 8.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

          seenExceptionsUpdater.compareAndSet(state, expect, update);
        }
    
        @Override
        int decrementAndGetRemainingCount(AggregateFutureState<?> state) {
          return remainingCountUpdater.decrementAndGet(state);
        }
      }
    
      private static final class SynchronizedAtomicHelper extends AtomicHelper {
        @Override
        void compareAndSetSeenExceptions(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 28 20:40:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. guava/src/com/google/common/util/concurrent/AggregateFutureState.java

          seenExceptionsUpdater.compareAndSet(state, expect, update);
        }
    
        @Override
        int decrementAndGetRemainingCount(AggregateFutureState<?> state) {
          return remainingCountUpdater.decrementAndGet(state);
        }
      }
    
      private static final class SynchronizedAtomicHelper extends AtomicHelper {
        @Override
        void compareAndSetSeenExceptions(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue May 28 20:40:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/helper/CrawlerStatsHelper.java

                count = new AtomicInteger(1);
            }
    
            public int increment() {
                return count.incrementAndGet();
            }
    
            public int decrement() {
                return count.decrementAndGet();
            }
        }
    
        public enum StatsAction {
            ACCESSED, //
            ACCESS_EXCEPTION, //
            CHILD_URL, //
            CHILD_URLS, //
            EVALUATED, //
            EXCEPTION, //
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. 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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top