Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 123 for loader (0.17 sec)

  1. android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java

     * strengths.
     *
     * @author mike nonemacher
     */
    public class CacheReferencesTest extends TestCase {
    
      private static final CacheLoader<Key, String> KEY_TO_STRING_LOADER =
          new CacheLoader<Key, String>() {
            @Override
            public String load(Key key) {
              return key.toString();
            }
          };
    
      private CacheBuilderFactory factoryWithAllKeyStrengths() {
        return new CacheBuilderFactory()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/cache/LocalCache.java

          try {
            stopwatch.start();
            V previousValue = oldValue.get();
            if (previousValue == null) {
              V newValue = loader.load(key);
              return set(newValue) ? futureValue : Futures.immediateFuture(newValue);
            }
            ListenableFuture<V> newValue = loader.reload(key, previousValue);
            if (newValue == null) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

       * {@link CacheLoader#load} calls to {@code loader}.
       */
      static <K, V> CacheLoader<K, V> bulkLoader(final CacheLoader<K, V> loader) {
        checkNotNull(loader);
        return new CacheLoader<K, V>() {
          @Override
          public V load(K key) throws Exception {
            return loader.load(key);
          }
    
          @Override
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 09 15:17:25 GMT 2018
    - 4.9K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

                return new Object();
              }
            };
        LocalLoadingCache<Object, Object> cache = makeCache(createCacheBuilder(), loader);
        assertSame(loader, cache.localCache.defaultLoader);
      }
    
      // null parameters test
    
      public void testNullParameters() throws Exception {
        NullPointerTester tester = new NullPointerTester();
        CacheLoader<Object, Object> loader = identityLoader();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 12.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        Callable<Integer> loader =
            new Callable<Integer>() {
              private int i = 0;
    
              @Override
              public Integer call() throws Exception {
                return ++i;
              }
            };
    
        cache.put(0, 10);
    
        assertEquals(Integer.valueOf(10), cache.get(0, loader));
        assertEquals(Integer.valueOf(1), cache.get(20, loader));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 15.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/reflect/ClassPathTest.java

              ImmutableSet.of(
                  new ResourceInfo(FILE, "left/some.txt", loader),
                  new ResourceInfo(FILE, "left/sibling/another.txt", loader),
                  new ResourceInfo(FILE, "right/another.txt", loader),
                  new ResourceInfo(FILE, "right/sibling/some.txt", loader)),
              new ClassPath.LocationInfo(root.toFile(), loader).scanResources());
        } finally {
          deleteRecursivelyOrLog(root);
        }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Jul 10 17:06:37 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/ResourcesTest.java

        // loader, even if it is not visible to the loader of the Resources class.
    
        File tempFile = createTempFile();
        PrintWriter writer = new PrintWriter(tempFile, "UTF-8");
        writer.println("rud a chur ar an méar fhada");
        writer.close();
    
        // First check that we can't find it without setting the context loader.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        Callable<Integer> loader =
            new Callable<Integer>() {
              private int i = 0;
    
              @Override
              public Integer call() throws Exception {
                return ++i;
              }
            };
    
        cache.put(0, 10);
    
        assertEquals(Integer.valueOf(10), cache.get(0, loader));
        assertEquals(Integer.valueOf(1), cache.get(20, loader));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/reflect/Reflection.java

        }
      }
    
      /**
       * Returns a proxy instance that implements {@code interfaceType} by dispatching method
       * invocations to {@code handler}. The class loader of {@code interfaceType} will be used to
       * define the proxy class. To implement multiple interfaces or specify a class loader, use {@link
       * Proxy#newProxyInstance}.
       *
       * @throws IllegalArgumentException if {@code interfaceType} does not specify the type of a Java
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 3.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java

       * loaded by this test and that will obviously remain loaded for as long as the test is running.
       * So in order to check ClassLoader garbage collection we need to create a new ClassLoader and
       * make it load its own version of FinalizableReferenceQueue. Then we need to interact with that
       * parallel version through reflection in order to exercise the parallel
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 16 03:24:50 GMT 2021
    - 13.3K bytes
    - Viewed (0)
Back to top