Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for simulate (0.21 sec)

  1. android/guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        assertThrows(IllegalArgumentException.class, () -> multiset.add(KEY, COUNT_TO_ADD));
      }
    
      /**
       * Simulate some of the races that can happen on add. We can't easily simulate the race that
       * happens when an {@link AtomicInteger#compareAndSet} fails, but we can simulate the case where
       * the putIfAbsent returns a non-null value, and the case where the replace() of an observed zero
       * fails.
       */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java

        assertThrows(IllegalArgumentException.class, () -> multiset.add(KEY, COUNT_TO_ADD));
      }
    
      /**
       * Simulate some of the races that can happen on add. We can't easily simulate the race that
       * happens when an {@link AtomicInteger#compareAndSet} fails, but we can simulate the case where
       * the putIfAbsent returns a non-null value, and the case where the replace() of an observed zero
       * fails.
       */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/cache/CacheTesting.java

     *
     * @author mike nonemacher
     */
    @SuppressWarnings("GuardedBy") // TODO(b/35466881): Fix or suppress.
    class CacheTesting {
    
      /**
       * Poke into the Cache internals to simulate garbage collection of the value associated with the
       * given key. This assumes that the associated entry is a WeakValueReference or a
       * SoftValueReference (and not a LoadingValueReference), and throws an IllegalStateException if
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

                  new CountDownLatch(1).await(); // the interrupt will wake us up
                } catch (InterruptedException ie) {
                  // continue
                }
                LockSupport.unpark(Thread.currentThread()); // simulate a spurious wakeup.
                return null;
              }
    
              @Override
              boolean isDone() {
                return false;
              }
    
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheTesting.java

     *
     * @author mike nonemacher
     */
    @SuppressWarnings("GuardedBy") // TODO(b/35466881): Fix or suppress.
    class CacheTesting {
    
      /**
       * Poke into the Cache internals to simulate garbage collection of the value associated with the
       * given key. This assumes that the associated entry is a WeakValueReference or a
       * SoftValueReference (and not a LoadingValueReference), and throws an IllegalStateException if
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

                  new CountDownLatch(1).await(); // the interrupt will wake us up
                } catch (InterruptedException ie) {
                  // continue
                }
                LockSupport.unpark(Thread.currentThread()); // simulate a spurious wakeup.
                return null;
              }
    
              @Override
              boolean isDone() {
                return false;
              }
    
              @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  7. guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
     * <p><b>Warning for Android users:</b> a stopwatch with default behavior may not continue to keep
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Stopwatch.java

     * that is already in the desired state.
     *
     * <p>When testing code that uses this class, use {@link #createUnstarted(Ticker)} or {@link
     * #createStarted(Ticker)} to supply a fake or mock ticker. This allows you to simulate any valid
     * behavior of the stopwatch.
     *
     * <p><b>Note:</b> This class is not thread-safe.
     *
     * <p><b>Warning for Android users:</b> a stopwatch with default behavior may not continue to keep
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Nov 15 21:38:09 GMT 2022
    - 8.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

       * Assigns a thread to the given {@link Future} to provide {@link ListenableFuture} functionality.
       *
       * <p><b>Warning:</b> If the input future does not already implement {@code ListenableFuture}, the
       * returned future will emulate {@link ListenableFuture#addListener} by taking a thread from an
       * internal, unbounded pool at the first call to {@code addListener} and holding it until the
       * future is {@linkplain Future#isDone() done}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/collect/testing/Helpers.java

            assertTrue(greater + ".compareTo(" + t + ')', greater.compareTo(t) > 0);
            assertFalse(greater.equals(t));
          }
        }
      }
    
      /**
       * Returns a collection that simulates concurrent modification by having its size method return
       * incorrect values. This is useful for testing methods that must treat the return value from
       * size() as a hint only.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 26 19:46:10 GMT 2024
    - 17.7K bytes
    - Viewed (0)
Back to top