Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for idleConnectionCount (0.22 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
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. 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() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  3. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K 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()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  5. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  6. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K 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
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
Back to top