Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for updateAndGet (0.45 sec)

  1. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

       * returns the new value. If there is not currently a value associated with {@code key}, the
       * function is applied to {@code 0L}.
       *
       * @since 21.0
       */
      @CanIgnoreReturnValue
      public long updateAndGet(K key, LongUnaryOperator updaterFunction) {
        checkNotNull(updaterFunction);
        Long result =
            map.compute(
                key, (k, value) -> updaterFunction.applyAsLong(value == null ? 0L : value.longValue()));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  2. src/main/java/jcifs/util/AuthenticationRateLimiter.java

                recentAttempts.incrementAndGet();
                lastAttempt = now;
            }
    
            void recordSuccess() {
                // Reduce counter on success to allow recovery
                recentAttempts.updateAndGet(val -> Math.max(0, val - 1));
            }
    
            void reset() {
                recentAttempts.set(0);
                blocked.set(false);
                blockExpiry = null;
                windowStart = Instant.now();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.1K bytes
    - Viewed (0)
Back to top