Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 60 for increment (0.19 sec)

  1. guava/src/com/google/common/cache/LongAddable.java

    /**
     * Abstract interface for objects that can concurrently add longs.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    interface LongAddable {
      void increment();
    
      void add(long x);
    
      long sum();
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 918 bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/LongAdder.java

              || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
        }
      }
    
      /** Equivalent to {@code add(1)}. */
      @Override
      public void increment() {
        add(1L);
      }
    
      /** Equivalent to {@code add(-1)}. */
      public void decrement() {
        add(-1L);
      }
    
      /**
       * Returns the current sum. The returned value is NOT an atomic snapshot; invocation in
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/LongAdder.java

              || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
        }
      }
    
      /** Equivalent to {@code add(1)}. */
      @Override
      public void increment() {
        add(1L);
      }
    
      /** Equivalent to {@code add(-1)}. */
      public void decrement() {
        add(-1L);
      }
    
      /**
       * Returns the current sum. The returned value is NOT an atomic snapshot; invocation in
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 5.5K bytes
    - Viewed (0)
  4. android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertEquals(20, ticker.read());
    
        for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) {
          ticker.setAutoIncrementStep(0, timeUnit);
          assertEquals(
              "Expected no auto-increment when setting autoIncrementStep to 0 " + timeUnit,
              30,
              ticker.read());
        }
      }
    
      public void testAutoIncrement_negative() {
        FakeTicker ticker = new FakeTicker();
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertEquals(20, ticker.read());
    
        for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) {
          ticker.setAutoIncrementStep(0, timeUnit);
          assertEquals(
              "Expected no auto-increment when setting autoIncrementStep to 0 " + timeUnit,
              30,
              ticker.read());
        }
      }
    
      public void testAutoIncrement_negative() {
        FakeTicker ticker = new FakeTicker();
        try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/SequentialExecutor.java

                  if (workerRunningState == RUNNING) {
                    // Don't want to have two workers pulling from the queue.
                    return;
                  } else {
                    // Increment the run counter to avoid the ABA problem of a submitter marking the
                    // thread as QUEUED after it already ran and exhausted the queue before returning
                    // from execute().
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LongAdder.java

     */
    
    package com.google.common.cache;
    
    /**
     * GWT emulated version of LongAdder.
     *
     * @author Charles Fry
     */
    class LongAdder implements LongAddable {
    
      private long value;
    
      public void increment() {
        value++;
      }
    
      public void add(long x) {
        value += x;
      }
    
      public long sum() {
        return value;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 914 bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/cache/LongAddable.java

    /**
     * Abstract interface for objects that can concurrently add longs.
     *
     * @author Louis Wasserman
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    interface LongAddable {
      void increment();
    
      void add(long x);
    
      long sum();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 918 bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/LongAddables.java

      }
    
      public static LongAddable create() {
        return SUPPLIER.get();
      }
    
      private static final class PureJavaLongAddable extends AtomicLong implements LongAddable {
        @Override
        public void increment() {
          getAndIncrement();
        }
    
        @Override
        public void add(long x) {
          getAndAdd(x);
        }
    
        @Override
        public long sum() {
          return get();
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 04 17:27:14 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/LongAddables.java

      }
    
      public static LongAddable create() {
        return SUPPLIER.get();
      }
    
      private static final class PureJavaLongAddable extends AtomicLong implements LongAddable {
        @Override
        public void increment() {
          getAndIncrement();
        }
    
        @Override
        public void add(long x) {
          getAndAdd(x);
        }
    
        @Override
        public long sum() {
          return get();
        }
      }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jan 04 17:27:14 GMT 2022
    - 2K bytes
    - Viewed (0)
Back to top