Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 35 for AtomicInteger (0.12 seconds)

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

        // Verify that all of the runnables execute in a reasonable amount of time.
        assertTrue(countDownLatch.await(1L, SECONDS));
      }
    
      public void testExecute_idempotent() {
        AtomicInteger runCalled = new AtomicInteger();
        list.add(runCalled::getAndIncrement, directExecutor());
        list.execute();
        assertEquals(1, runCalled.get());
        list.execute();
        assertEquals(1, runCalled.get());
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/cache/CacheLoaderTest.java

        }
    
        private void runNext() {
          tasks.removeFirst().run();
        }
      }
    
      public void testAsyncReload() throws Exception {
        AtomicInteger loadCount = new AtomicInteger();
        AtomicInteger reloadCount = new AtomicInteger();
        AtomicInteger loadAllCount = new AtomicInteger();
    
        CacheLoader<Object, Object> baseLoader =
            new CacheLoader<Object, Object>() {
              @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 30 22:03:28 GMT 2025
    - 3.8K bytes
    - Click Count (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        // Verify that all of the runnables execute in a reasonable amount of time.
        assertTrue(countDownLatch.await(1L, SECONDS));
      }
    
      public void testExecute_idempotent() {
        AtomicInteger runCalled = new AtomicInteger();
        list.add(runCalled::getAndIncrement, directExecutor());
        list.execute();
        assertEquals(1, runCalled.get());
        list.execute();
        assertEquals(1, runCalled.get());
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

       * and {@link #getReloadCount}.
       */
      static class IncrementingLoader extends CacheLoader<Integer, Integer> {
        private final AtomicInteger countLoad = new AtomicInteger();
        private final AtomicInteger countReload = new AtomicInteger();
    
        @CanIgnoreReturnValue // Sure, why not?
        @Override
        public Integer load(Integer key) {
          countLoad.incrementAndGet();
          return key;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 13:13:59 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  5. src/test/java/org/codelibs/fess/job/JobExecutorTest.java

            // Test multiple JobExecutor instances
            JobExecutor executor1 = new TestJobExecutor();
            JobExecutor executor2 = new TestJobExecutor();
    
            AtomicInteger counter1 = new AtomicInteger(0);
            AtomicInteger counter2 = new AtomicInteger(0);
    
            executor1.addShutdownListener(() -> counter1.incrementAndGet());
            executor2.addShutdownListener(() -> counter2.incrementAndGet());
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 9.4K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

       * and {@link #getReloadCount}.
       */
      static class IncrementingLoader extends CacheLoader<Integer, Integer> {
        private final AtomicInteger countLoad = new AtomicInteger();
        private final AtomicInteger countReload = new AtomicInteger();
    
        @CanIgnoreReturnValue // Sure, why not?
        @Override
        public Integer load(Integer key) {
          countLoad.incrementAndGet();
          return key;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Feb 23 13:13:59 GMT 2026
    - 5.1K bytes
    - Click Count (0)
  7. impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/BuildThreadFactory.java

    import java.util.concurrent.ThreadFactory;
    import java.util.concurrent.atomic.AtomicInteger;
    
    /**
     * Simple {@link ThreadFactory} implementation that ensures the corresponding threads have a meaningful name.
     */
    public class BuildThreadFactory implements ThreadFactory {
        private final AtomicInteger id = new AtomicInteger();
    
        private static final String PREFIX = "BuilderThread";
    
        @Override
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 1.4K bytes
    - Click Count (0)
  8. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

        // Make sure our dispatcher got the request.
        assertThat(requestsMade.size).isEqualTo(1)
      }
    
      @Test
      fun outOfOrderResponses() {
        val firstResponseCode = AtomicInteger()
        val secondResponseCode = AtomicInteger()
        val secondRequest = "/bar"
        val firstRequest = "/foo"
        val latch = CountDownLatch(1)
        val dispatcher: Dispatcher =
          object : Dispatcher() {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 3.2K bytes
    - Click Count (1)
  9. samples/crawler/src/main/java/okhttp3/sample/Crawler.java

            currentThread.setName(originalName);
          }
        }
      }
    
      public void fetch(HttpUrl url) throws IOException {
        // Skip hosts that we've visited many times.
        AtomicInteger hostnameCount = new AtomicInteger();
        AtomicInteger previous = hostnames.putIfAbsent(url.host(), hostnameCount);
        if (previous != null) hostnameCount = previous;
        if (hostnameCount.getAndIncrement() >= hostLimit) return;
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jul 23 00:58:06 GMT 2025
    - 5K bytes
    - Click Count (0)
  10. src/main/java/jcifs/internal/smb2/rdma/RdmaConnection.java

        /** Local endpoint address */
        protected final InetSocketAddress localAddress;
        /** Available send credits for flow control */
        protected final AtomicInteger sendCredits;
        /** Available receive credits for flow control */
        protected final AtomicInteger receiveCredits;
        /** Queue of pending RDMA work requests */
        protected final BlockingQueue<RdmaWorkRequest> pendingRequests;
    
        // Connection state
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 24 00:12:28 GMT 2025
    - 8.2K bytes
    - Click Count (0)
Back to Top