Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 131 for AtomicInteger (0.24 seconds)

  1. guava-tests/test/com/google/common/primitives/ImmutableIntArrayTest.java

       */
      public void testBuilder_bruteForce() {
        for (int i = 0; i < reduceIterationsIfGwt(100); i++) {
          ImmutableIntArray.Builder builder = ImmutableIntArray.builder(random.nextInt(20));
          AtomicInteger counter = new AtomicInteger(0);
          while (counter.get() < 1000) {
            BuilderOp op = BuilderOp.randomOp();
            op.doIt(builder, counter);
          }
          ImmutableIntArray iia = builder.build();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Dec 12 14:49:24 GMT 2025
    - 20.6K bytes
    - Click Count (0)
  2. src/test/java/jcifs/util/SimpleCircuitBreakerTest.java

        void testThreadSafety() throws InterruptedException {
            SimpleCircuitBreaker breaker = new SimpleCircuitBreaker("concurrent", 5, 3, 100);
            AtomicInteger successCount = new AtomicInteger(0);
            AtomicInteger failureCount = new AtomicInteger(0);
    
            // Create multiple threads
            Thread[] threads = new Thread[10];
            for (int i = 0; i < threads.length; i++) {
                final int index = i;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 10.6K 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. src/test/java/jcifs/smb/SmbSessionImplSecurityTest.java

            CountDownLatch startLatch = new CountDownLatch(1);
            CountDownLatch endLatch = new CountDownLatch(threadCount);
            AtomicInteger releaseCount = new AtomicInteger(0);
            AtomicInteger acquireCount = new AtomicInteger(0);
    
            // Acquire session multiple times
            for (int i = 0; i < threadCount - 1; i++) {
                session.acquire();
            }
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 11K bytes
    - Click Count (0)
  5. 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)
  6. 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)
  7. 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)
  8. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

      }
    
      public void testRemovalListener_expireAfterWrite() {
        FakeTicker ticker = new FakeTicker();
        AtomicInteger evictionCount = new AtomicInteger();
        AtomicInteger applyCount = new AtomicInteger();
        AtomicInteger totalSum = new AtomicInteger();
    
        RemovalListener<Integer, AtomicInteger> removalListener =
            notification -> {
              if (notification.wasEvicted()) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 16:38:16 GMT 2026
    - 19.1K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

      }
    
      public void testConstructingWithNullExecutor_fails() {
        assertThrows(NullPointerException.class, () -> new SequentialExecutor(null));
      }
    
      public void testBasics() {
        AtomicInteger totalCalls = new AtomicInteger();
        Runnable intCounter =
            () -> {
              totalCalls.incrementAndGet();
              // Make sure that no other tasks are scheduled to run while this is running.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 10.5K bytes
    - Click Count (0)
  10. 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)
Back to Top