- Sort Score
- Num 10 results
- Language All
Results 1 - 9 of 9 for getAndIncrement (0.2 seconds)
-
android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
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) -
guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
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) -
docs/features/events.md
public static final Factory FACTORY = new Factory() { final AtomicLong nextCallId = new AtomicLong(1L); @Override public EventListener create(Call call) { long callId = nextCallId.getAndIncrement(); System.out.printf("%04d %s%n", callId, call.request().url()); return new PrintingEventListener(callId, System.nanoTime()); } }; final long callId; final long callStartNanos;
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sun Mar 15 09:01:42 GMT 2026 - 7.7K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/ds/callback/IndexUpdateCallbackImplTest.java
indexingHelper.sendDocuments(searchEngineClient, docList); } executeTime += processingTime; } documentSize.getAndIncrement(); } }
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 24.7K bytes - Click Count (0) -
guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java
* static final AtomicLong seq = new AtomicLong(); * * final long seqNum; * final E entry; * * public FIFOEntry(E entry) { * seqNum = seq.getAndIncrement(); * this.entry = entry; * } * * public E getEntry() { * return entry; * } * * public int compareTo(FIFOEntry<E> other) { * int res = entry.compareTo(other.entry);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 23 21:06:42 GMT 2026 - 19K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Ordering.java
// One or more integer values could be skipped in the event of a race // to generate a UID for the same object from multiple threads, but // that shouldn't be a problem. uid = counter.getAndIncrement(); Integer alreadySet = uids.putIfAbsent(obj, uid); if (alreadySet != null) { uid = alreadySet; } } return uid; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 39.4K bytes - Click Count (0) -
guava/src/com/google/common/collect/Ordering.java
// One or more integer values could be skipped in the event of a race // to generate a UID for the same object from multiple threads, but // that shouldn't be a problem. uid = counter.getAndIncrement(); Integer alreadySet = uids.putIfAbsent(obj, uid); if (alreadySet != null) { uid = alreadySet; } } return uid; } @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 39.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/CacheLoadingTest.java
CacheLoader<Integer, String> failOnceFunction = new CacheLoader<Integer, String>() { @Override public String load(Integer key) throws Exception { if (count.getAndIncrement() == 0) { throw e; } return key.toString(); } }; CountingRemovalListener<Integer, String> removalListener = countingRemovalListener();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 91K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
CacheLoader<Integer, String> failOnceFunction = new CacheLoader<Integer, String>() { @Override public String load(Integer key) throws Exception { if (count.getAndIncrement() == 0) { throw e; } return key.toString(); } }; CountingRemovalListener<Integer, String> removalListener = countingRemovalListener();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 91K bytes - Click Count (0)