Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for newBuilder (7.18 sec)

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

            () -> CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1));
        assertThrows(
            IllegalStateException.class,
            () -> CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)));
      }
    
      @GwtIncompatible // weakKeys
      public void testKeyStrengthSetTwice() {
        CacheBuilder<Object, Object> builder1 = CacheBuilder.newBuilder().weakKeys();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        val differentDnsUrl = url.newBuilder().host("differentdns.com").build()
        assertFailsWith<IOException> {
          execute(differentDnsUrl)
        }
      }
    
      @Test
      fun skipsOnRedirectWhenDnsDontMatch() {
        server.enqueue(
          MockResponse.Builder()
            .code(301)
            .addHeader("Location", url.newBuilder().host("differentdns.com").build())
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        val request = Request(server.url("/"))
        assertConnectionNotReused(request, request)
      }
    
      @Test
      fun connectionsAreNotReusedIfPoolIsSizeZero() {
        client =
          client.newBuilder()
            .connectionPool(ConnectionPool(0, 5, TimeUnit.SECONDS))
            .build()
        server.enqueue(MockResponse(body = "a"))
        server.enqueue(MockResponse(body = "b"))
        val request = Request(server.url("/"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

            () -> CacheBuilder.newBuilder().weigher(constantWeigher(42)).maximumSize(1));
        assertThrows(
            IllegalStateException.class,
            () -> CacheBuilder.newBuilder().maximumSize(1).weigher(constantWeigher(42)));
      }
    
      @GwtIncompatible // weakKeys
      public void testKeyStrengthSetTwice() {
        CacheBuilder<Object, Object> builder1 = CacheBuilder.newBuilder().weakKeys();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

        super.setUp();
    
        fakeTicker = new FakeTicker();
      }
    
      public void testLoader() throws ExecutionException {
    
        final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
    
        Callable<Integer> loader =
            new Callable<Integer>() {
              private int i = 0;
    
              @Override
              public Integer call() throws Exception {
                return ++i;
    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/cache/CacheBuilderSpecTest.java

            CacheBuilder.newBuilder().expireAfterWrite(10L, TimeUnit.MINUTES), CacheBuilder.from(spec));
      }
    
      public void testParse_writeExpirationSeconds() {
        CacheBuilderSpec spec = parse("expireAfterWrite=10s");
        assertEquals(TimeUnit.SECONDS, spec.writeExpirationTimeUnit);
        assertEquals(10L, spec.writeExpirationDuration);
        assertCacheBuilderEquivalence(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheEvictionTest.java

          LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumSize(i).build(loader);
          assertEquals(i, CacheTesting.getTotalSegmentSize(cache));
        }
      }
    
      public void testEviction_setMaxSegmentWeight() {
        IdentityLoader<Object> loader = identityLoader();
        for (int i = 1; i < 1000; i++) {
          LoadingCache<Object, Object> cache =
              CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 14.9K bytes
    - Viewed (0)
  8. maven-api-impl/src/main/java/org/apache/maven/internal/impl/SettingsUtilsV4.java

            Profile.Builder profile = Profile.newBuilder();
    
            profile.id(modelProfile.getId());
    
            org.apache.maven.api.model.Activation modelActivation = modelProfile.getActivation();
    
            if (modelActivation != null) {
                Activation.Builder activation = Activation.newBuilder();
    
                activation.activeByDefault(modelActivation.isActiveByDefault());
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Mar 25 10:50:01 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/CacheEvictionTest.java

          LoadingCache<Object, Object> cache = CacheBuilder.newBuilder().maximumSize(i).build(loader);
          assertEquals(i, CacheTesting.getTotalSegmentSize(cache));
        }
      }
    
      public void testEviction_setMaxSegmentWeight() {
        IdentityLoader<Object> loader = identityLoader();
        for (int i = 1; i < 1000; i++) {
          LoadingCache<Object, Object> cache =
              CacheBuilder.newBuilder().maximumWeight(i).weigher(constantWeigher(1)).build(loader);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 14.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

            CacheBuilder.newBuilder().expireAfterWrite(10L, TimeUnit.MINUTES), CacheBuilder.from(spec));
      }
    
      public void testParse_writeExpirationSeconds() {
        CacheBuilderSpec spec = parse("expireAfterWrite=10s");
        assertEquals(TimeUnit.SECONDS, spec.writeExpirationTimeUnit);
        assertEquals(10L, spec.writeExpirationDuration);
        assertCacheBuilderEquivalence(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.2K bytes
    - Viewed (0)
Back to top