Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for idleConnectionCount (0.27 sec)

  1. okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt

        connectionListener = ConnectionListener.NONE,
      )
    
      constructor() : this(5, 5, TimeUnit.MINUTES)
    
      /** Returns the number of idle connections in the pool. */
      fun idleConnectionCount(): Int = delegate.idleConnectionCount()
    
      /** Returns total number of connections in the pool. */
      fun connectionCount(): Int = delegate.connectionCount()
    
      internal val connectionListener: ConnectionListener
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 03 20:39:41 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. 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
      }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

          }
      }
    
      @Test
      fun connectionPool() {
        var connectionPool = ConnectionPool()
        connectionPool = ConnectionPool(0, 0L, TimeUnit.SECONDS)
        val idleConnectionCount: Int = connectionPool.idleConnectionCount()
        val connectionCount: Int = connectionPool.connectionCount()
        connectionPool.evictAll()
      }
    
      @Test
      fun connectionSpec() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  4. 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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  5. 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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  6. 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
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            .socketPolicy(DisconnectAtEnd)
            .build(),
        )
        val response = getResponse(newRequest("/"))
        assertContent("{}", response)
        assertThat(client.connectionPool.idleConnectionCount()).isEqualTo(0)
      }
    
      @Test
      fun earlyDisconnectDoesntHarmPoolingWithChunkedEncoding() {
        testEarlyDisconnectDoesntHarmPooling(TransferKind.CHUNKED)
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top