Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 164 for records (0.29 sec)

  1. guava/src/com/google/common/cache/AbstractCache.java

       *
       * @since 10.0
       */
      public interface StatsCounter {
        /**
         * Records cache hits. This should be called when a cache request returns a cached value.
         *
         * @param count the number of hits to record
         * @since 11.0
         */
        void recordHits(int count);
    
        /**
         * Records cache misses. This should be called when a cache request returns a value that was not
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 9.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/ForwardingCacheTest.java

      @Override
      public void setUp() throws Exception {
        super.setUp();
        /*
         * Class parameters must be raw, so we can't create a proxy with generic
         * type arguments. The created proxy only records calls and returns null, so
         * the type is irrelevant at runtime.
         */
        mock = mock(Cache.class);
        forward =
            new ForwardingCache<String, Boolean>() {
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/testing/TestLogHandler.java

    public class TestLogHandler extends Handler {
      /** We will keep a private list of all logged records */
      private final List<LogRecord> list = new ArrayList<>();
    
      /** Adds the most recently logged record to our list. */
      @Override
      public synchronized void publish(@Nullable LogRecord record) {
        if (record != null) {
          list.add(record);
        }
      }
    
      @Override
      public void flush() {}
    
      @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/TestLogHandler.java

    public class TestLogHandler extends Handler {
      /** We will keep a private list of all logged records */
      private final List<LogRecord> list = new ArrayList<>();
    
      /** Adds the most recently logged record to our list. */
      @Override
      public synchronized void publish(@Nullable LogRecord record) {
        if (record != null) {
          list.add(record);
        }
      }
    
      @Override
      public void flush() {}
    
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/eventbus/AsyncEventBusTest.java

        assertEquals("One event should be delivered.", 1, events.size());
        assertEquals("Correct string should be delivered.", EVENT, events.get(0));
      }
    
      /**
       * An {@link Executor} wanna-be that simply records the tasks it's given. Arguably the Worst
       * Executor Ever.
       *
       * @author cbiffle
       */
      public static class FakeExecutor implements Executor {
        List<Runnable> tasks = Lists.newArrayList();
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue May 15 20:25:06 GMT 2018
    - 2.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/ForwardingLoadingCacheTest.java

      @Override
      public void setUp() throws Exception {
        super.setUp();
        /*
         * Class parameters must be raw, so we can't create a proxy with generic
         * type arguments. The created proxy only records calls and returns null, so
         * the type is irrelevant at runtime.
         */
        mock = mock(LoadingCache.class);
        forward =
            new ForwardingLoadingCache<String, Boolean>() {
              @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 12:41:04 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/testing/TestLogHandlerTest.java

        ExampleClassUnderTest.foo();
        LogRecord record = handler.getStoredLogRecords().get(0);
        assertEquals(Level.INFO, record.getLevel());
        assertEquals("message", record.getMessage());
        assertSame(EXCEPTION, record.getThrown());
      }
    
      public void testConcurrentModification() throws Exception {
        // Tests for the absence of a bug where logging while iterating over the
        // stored log records causes a ConcurrentModificationException
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.8K bytes
    - Viewed (0)
  8. android/guava-testlib/test/com/google/common/testing/TestLogHandlerTest.java

        ExampleClassUnderTest.foo();
        LogRecord record = handler.getStoredLogRecords().get(0);
        assertEquals(Level.INFO, record.getLevel());
        assertEquals("message", record.getMessage());
        assertSame(EXCEPTION, record.getThrown());
      }
    
      public void testConcurrentModification() throws Exception {
        // Tests for the absence of a bug where logging while iterating over the
        // stored log records causes a ConcurrentModificationException
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/eventbus/StringCatcher.java

    import com.google.common.collect.Lists;
    import java.util.List;
    import junit.framework.Assert;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * A simple EventSubscriber mock that records Strings.
     *
     * <p>For testing fun, also includes a landmine method that EventBus tests are required not
     * to call ({@link #methodWithoutAnnotation(String)}).
     *
     * @author Cliff Biffle
     */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertEquals(ByteSource.empty(), source.slice(0, 3).slice(4, 3));
      }
    
      private static int getAndResetRecords(TestLogHandler logHandler) {
        int records = logHandler.getStoredLogRecords().size();
        logHandler.clear();
        return records;
      }
    
      private static void runFailureTest(ByteSource in, ByteSink out) {
        try {
          in.copyTo(out);
          fail();
        } catch (IOException expected) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.9K bytes
    - Viewed (0)
Back to top