- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 131 for AtomicInteger (0.08 seconds)
-
guava/src/com/google/common/collect/ConcurrentHashMultiset.java
while (true) { AtomicInteger existingCounter = safeGet(countMap, element); if (existingCounter == null) { existingCounter = countMap.putIfAbsent(element, new AtomicInteger(occurrences)); if (existingCounter == null) { return 0; } // existingCounter != null: fall through to operate against the existing AtomicInteger } while (true) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Dec 26 20:08:09 GMT 2025 - 22.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
*/ public void testAdd_withFailures() { AtomicInteger existing = new AtomicInteger(12); AtomicInteger existingZero = new AtomicInteger(0); // initial map.get() when(backingMap.get(KEY)).thenReturn(null); // since get returned null, try a putIfAbsent; that fails due to a simulated race when(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).thenReturn(existingZero);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 16.3K bytes - Click Count (0) -
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) -
src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java
@Test public void test_mixedCallbacks_onlyThenInvokedOnResolve() throws Exception { final Deferred<SuggestResponse> deferred = new Deferred<>(); final AtomicInteger thenCount = new AtomicInteger(0); final AtomicInteger errorCount = new AtomicInteger(0); final CountDownLatch latch = new CountDownLatch(1); deferred.promise().then(response -> { thenCount.incrementAndGet();Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sun Feb 01 12:48:24 GMT 2026 - 21.1K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/util/ThreadDumpUtilTest.java
// Expected behavior } } @Test public void test_processThreadDump_multipleThreads() { AtomicInteger threadCount = new AtomicInteger(0); AtomicInteger stackTraceCount = new AtomicInteger(0); Consumer<String> countingConsumer = line -> { if (line.startsWith("Thread:")) { threadCount.incrementAndGet();Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 15.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java
volatile boolean startUpCalled = false; volatile boolean shutDownCalled = false; final AtomicInteger numberOfTimesRunCalled = new AtomicInteger(0); final AtomicInteger numberOfTimesExecutorCalled = new AtomicInteger(0); final AtomicInteger numberOfTimesSchedulerCalled = new AtomicInteger(0); volatile @Nullable Exception runException = null; volatile @Nullable Exception startUpException = null;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 22.8K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java
volatile boolean startUpCalled = false; volatile boolean shutDownCalled = false; final AtomicInteger numberOfTimesRunCalled = new AtomicInteger(0); final AtomicInteger numberOfTimesExecutorCalled = new AtomicInteger(0); final AtomicInteger numberOfTimesSchedulerCalled = new AtomicInteger(0); volatile @Nullable Exception runException = null; volatile @Nullable Exception startUpException = null;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 22.8K bytes - Click Count (0) -
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) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
while (true) { AtomicInteger existingCounter = safeGet(countMap, element); if (existingCounter == null) { existingCounter = countMap.putIfAbsent(element, new AtomicInteger(occurrences)); if (existingCounter == null) { return 0; } // existingCounter != null: fall through to operate against the existing AtomicInteger } while (true) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Dec 26 20:08:09 GMT 2025 - 22.3K bytes - Click Count (0) -
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>() { @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 30 22:03:28 GMT 2025 - 3.8K bytes - Click Count (0)