Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for idleConnectionCount (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

      init {
        // Put a floor on the keep alive duration, otherwise cleanup will spin loop.
        require(keepAliveDuration > 0L) { "keepAliveDuration <= 0: $keepAliveDuration" }
      }
    
      fun idleConnectionCount(): Int {
        return connections.count {
          it.withLock { it.calls.isEmpty() }
        }
      }
    
      fun connectionCount(): Int {
        return connections.size
      }
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

            .build()
        val request = Request(server.url("/"))
        executeSynchronously(request)
          .assertFailure(IOException::class.java)
        assertThat(client.connectionPool.idleConnectionCount()).isEqualTo(1)
      }
    
      @Test
      fun failedProxyAuthenticatorReleasesConnection() {
        server.enqueue(
          MockResponse(code = 407),
        )
        client =
          client.newBuilder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  3. okhttp/api/okhttp.api

    	public final fun connectionCount ()I
    	public final fun evictAll ()V
    	public final fun idleConnectionCount ()I
    	public final fun setPolicy (Lokhttp3/Address;Lokhttp3/ConnectionPool$AddressPolicy;)V
    }
    
    public final class okhttp3/ConnectionPool$AddressPolicy {
    	public final field backoffDelayMillis J
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CacheTest.kt

            .build(),
        )
        assertThat(get(server.url("/")).body.string()).isEqualTo("A")
        assertThat(get(server.url("/")).body.string()).isEqualTo("A")
        assertThat(client.connectionPool.idleConnectionCount()).isEqualTo(1)
      }
    
      @Test
      fun expiresDateBeforeModifiedDate() {
        assertConditionallyCached(
          MockResponse.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top