Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for incrementAndGet (0.08 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.incrementAndGet(key));
        assertEquals(1L, map.get(key));
    
        assertEquals(0L, map.decrementAndGet(key));
        assertEquals(0L, map.get(key));
        assertTrue(map.containsKey(key));
    
        assertEquals(1L, map.incrementAndGet(key));
        assertEquals(1L, map.get(key));
      }
    
      public void testGetAndIncrement() {
    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. guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

      public void testBasics() {
        final AtomicInteger totalCalls = new AtomicInteger();
        Runnable intCounter =
            new Runnable() {
              @Override
              public void run() {
                totalCalls.incrementAndGet();
                // Make sure that no other tasks are scheduled to run while this is running.
                assertFalse(fakePool.hasNext());
              }
            };
    
        assertFalse(fakePool.hasNext());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

      public void testBasics() {
        final AtomicInteger totalCalls = new AtomicInteger();
        Runnable intCounter =
            new Runnable() {
              @Override
              public void run() {
                totalCalls.incrementAndGet();
                // Make sure that no other tasks are scheduled to run while this is running.
                assertFalse(fakePool.hasNext());
              }
            };
    
        assertFalse(fakePool.hasNext());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                int behavior = random.nextInt(4);
                if (behavior == 0) { // throw an exception
                  exceptionCount.incrementAndGet();
                  throw new RuntimeException("fake exception for test");
                } else if (behavior == 1) { // return null
                  computeNullCount.incrementAndGet();
                  return null;
                } else if (behavior == 2) { // slight delay before returning
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() {
                if (currentFuture.get().set("set")) {
                  numSuccessfulSetCalls.incrementAndGet();
                }
                awaitUnchecked(barrier);
                return null;
              }
            };
        Callable<@Nullable Void> completeExceptionallyRunnable =
            new Callable<@Nullable Void>() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  6. src/test/java/jcifs/tests/ConcurrencyTest.java

                    out.write(0xAA);
                    this.writeCount.incrementAndGet();
                    this.completed = true;
                }
                catch ( IOException e ) {
                    if ( e instanceof SmbException && ( (SmbException) e ).getNtStatus() == NtStatus.NT_STATUS_SHARING_VIOLATION ) {
                        this.failCount.incrementAndGet();
                        this.completed = true;
                        return;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Nov 14 17:40:50 UTC 2021
    - 17.6K bytes
    - Viewed (0)
  7. src/main/java/jcifs/smb/SmbTreeImpl.java

        }
    
    
        /**
         * @param track
         * @return tree with increased usage count
         */
        public SmbTreeImpl acquire ( boolean track ) {
            long usage = this.usageCount.incrementAndGet();
            if ( log.isTraceEnabled() ) {
                log.trace("Acquire tree " + usage + " " + this);
            }
    
            if ( track && this.traceResource ) {
                synchronized ( this.acquires ) {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Thu Jan 05 13:06:39 UTC 2023
    - 29.6K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        ): Boolean {
          if (source.exhausted()) {
            return false // No more requests on this socket.
          }
    
          val request = readRequest(socket, source, sink, sequenceNumber)
          atomicRequestCount.incrementAndGet()
          requestQueue.add(request)
    
          if (request.failure != null) {
            return false // Nothing to respond to.
          }
    
          val response = dispatcher.dispatch(request)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/helper/CrawlerStatsHelper.java

                put(BEGIN_KEY, ComponentUtil.getSystemHelper().getCurrentTimeAsLong());
                count = new AtomicInteger(1);
            }
    
            public int increment() {
                return count.incrementAndGet();
            }
    
            public int decrement() {
                return count.decrementAndGet();
            }
        }
    
        public enum StatsAction {
            ACCESSED, //
            ACCESS_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. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

        if (generated != null) {
          freshness.incrementAndGet();
        }
        return generated;
      }
    
      final <T> @Nullable T generateFresh(Class<T> type) {
        return Primitives.wrap(type).cast(generateFresh(TypeToken.of(type)));
      }
    
      final <T> T newFreshProxy(final Class<T> interfaceType) {
        T proxy = newProxy(interfaceType);
        freshness.incrementAndGet();
        return proxy;
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 28.1K bytes
    - Viewed (0)
Back to top