Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for ConnectionPool (0.15 sec)

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

     * application. The tuning parameters in this pool are subject to change in future OkHttp releases.
     * Currently this pool holds up to 5 idle connections which will be evicted after 5 minutes of
     * inactivity.
     */
    class ConnectionPool internal constructor(
      internal val delegate: RealConnectionPool,
    ) {
      internal constructor(
        maxIdleConnections: Int = 5,
        keepAliveDuration: Long = 5,
        timeUnit: TimeUnit = TimeUnit.MINUTES,
    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

        val queue: TaskQueue,
        var policy: ConnectionPool.AddressPolicy,
      ) {
        /**
         * How many calls the pool can carry without opening new connections. This field must only be
         * accessed by the connection closer task.
         */
        var concurrentCallCapacity: Int = 0
      }
    
      companion object {
        fun get(connectionPool: ConnectionPool): RealConnectionPool = connectionPool.delegate
    
    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/main/kotlin/okhttp3/internal/internal.kt

    internal fun OkHttpClient.Builder.taskRunnerInternal(taskRunner: TaskRunner) = this.taskRunner(taskRunner)
    
    internal fun buildConnectionPool(
      connectionListener: ConnectionListener,
      taskRunner: TaskRunner,
    ): ConnectionPool =
      ConnectionPool(
        connectionListener = connectionListener,
        taskRunner = taskRunner,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. docs/contribute/debug_logging.md

    This logs task enqueues, starts, and finishes.
    
    ```
    [2020-01-01 00:00:00] Q10000 scheduled after   0 µs: OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 starting              : OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 run again after 300 s : OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 finished run in   1 ms: OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10001 scheduled after   0 µs: OkHttp squareup.com applyAndAckSettings
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 16:35:36 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              taskRunner = taskRunner,
              connectionPool = connectionPool,
              route = route,
              rawSocket = rawSocket,
              socket = socket,
              handshake = handshake,
              protocol = protocol,
              source = source,
              sink = sink,
              pingIntervalMillis = pingIntervalMillis,
              connectionListener = connectionPool.connectionListener,
            )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      val originalRequest: Request,
      val forWebSocket: Boolean,
    ) : Call, Cloneable {
      internal val lock: ReentrantLock = ReentrantLock()
    
      private val connectionPool: RealConnectionPool = client.connectionPool.delegate
    
      internal val eventListener: EventListener = client.eventListenerFactory.create(this)
    
      private val timeout =
        object : AsyncTimeout() {
          override fun timedOut() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        if (uncaughtException == null) {
          uncaughtException = throwable
        }
      }
    
      fun ensureAllConnectionsReleased() {
        testClient?.let {
          val connectionPool = it.connectionPool
    
          connectionPool.evictAll()
          if (connectionPool.connectionCount() > 0) {
            // Minimise test flakiness due to possible race conditions with connections closing.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

      }
    
      @Test fun inUseConnectionsNotEvicted() {
        val pool = factory.newConnectionPool()
        val poolApi = ConnectionPool(pool)
        val c1 = factory.newConnection(pool, routeA1, 50L)
        val client =
          OkHttpClient.Builder()
            .connectionPool(poolApi)
            .build()
        val call = client.newCall(Request(addressA.url)) as RealCall
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jun 22 16:06:35 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        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("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        val tunnelRequest =
          when {
            route.requiresTunnel() -> createTunnelRequest(route)
            else -> null
          }
    
        return ConnectPlan(
          taskRunner = taskRunner,
          connectionPool = connectionPool,
          readTimeoutMillis = readTimeoutMillis,
          writeTimeoutMillis = writeTimeoutMillis,
          socketConnectTimeoutMillis = socketConnectTimeoutMillis,
          socketReadTimeoutMillis = socketReadTimeoutMillis,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 12K bytes
    - Viewed (0)
Back to top