Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for idleConnectionCount (0.25 sec)

  1. okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jun 03 17:10:08 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/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 =
        connections.count {
          it.withLock { it.calls.isEmpty() }
        }
    
      fun connectionCount(): Int = connections.size
    
      /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jun 03 17:10:08 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  4. okhttp/api/jvm/okhttp.api

    public final class okhttp3/ConnectionPool {
    	public fun <init> ()V
    	public fun <init> (IJLjava/util/concurrent/TimeUnit;)V
    	public final fun connectionCount ()I
    	public final fun evictAll ()V
    	public final fun idleConnectionCount ()I
    }
    
    public final class okhttp3/ConnectionSpec {
    	public static final field CLEARTEXT Lokhttp3/ConnectionSpec;
    	public static final field COMPATIBLE_TLS Lokhttp3/ConnectionSpec;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/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
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
  6. okhttp/api/android/okhttp.api

    public final class okhttp3/ConnectionPool {
    	public fun <init> ()V
    	public fun <init> (IJLjava/util/concurrent/TimeUnit;)V
    	public final fun connectionCount ()I
    	public final fun evictAll ()V
    	public final fun idleConnectionCount ()I
    }
    
    public final class okhttp3/ConnectionSpec {
    	public static final field CLEARTEXT Lokhttp3/ConnectionSpec;
    	public static final field COMPATIBLE_TLS Lokhttp3/ConnectionSpec;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 113.6K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

            .onResponseEnd(ShutdownConnection)
            .build(),
        )
        val response = getResponse(newRequest("/"))
        assertContent("{}", response)
        assertThat(client.connectionPool.idleConnectionCount()).isEqualTo(0)
      }
    
      @Test
      fun earlyDisconnectDoesntHarmPoolingWithChunkedEncoding() {
        testEarlyDisconnectDoesntHarmPooling(TransferKind.CHUNKED)
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top