- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for incrementAndGet (0.17 sec)
-
android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java
@Override public Integer load(Integer key) { countLoad.incrementAndGet(); return key; } @GwtIncompatible // reload @Override public ListenableFuture<Integer> reload(Integer key, Integer oldValue) { countReload.incrementAndGet(); return immediateFuture(oldValue + 1); } public int getLoadCount() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 4.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheLoaderTest.java
@Override public Object load(Object key) { loadCount.incrementAndGet(); return new Object(); } @Override public ListenableFuture<Object> reload(Object key, Object oldValue) { reloadCount.incrementAndGet(); return immediateFuture(new Object()); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 3.6K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
android/guava-tests/test/com/google/common/cache/TestingRemovalListeners.java
private final AtomicInteger count = new AtomicInteger(); private volatile RemovalNotification<K, V> lastNotification; @Override public void onRemoval(RemovalNotification<K, V> notification) { count.incrementAndGet(); lastNotification = notification; } public int getCount() { return count.get(); } public K getLastEvictedKey() { return lastNotification.getKey(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3K bytes - Viewed (0) -
guava-tests/test/com/google/common/eventbus/outside/OutsideEventBusTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 1.8K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
.build( new CacheLoader<Integer, Integer>() { @Override public Integer load(Integer from) { return (int) misses.incrementAndGet(); } }); // To start, fill up the cache. // Each miss both increments the counter and causes the map to grow by one,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java
long delta = random.nextInt(deltaRange); int behavior = random.nextInt(10); switch (behavior) { case 0: map.incrementAndGet(key); threadSum++; break; case 1: map.decrementAndGet(key); threadSum--;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 4.2K bytes - Viewed (0)