Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for keepAliveDuration (0.33 sec)

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

      @ExperimentalOkHttpApi
      constructor(
        maxIdleConnections: Int = 5,
        keepAliveDuration: Long = 5,
        timeUnit: TimeUnit = TimeUnit.MINUTES,
        connectionListener: ConnectionListener = ConnectionListener.NONE,
      ) : this(
        taskRunner = TaskRunner.INSTANCE,
        maxIdleConnections = maxIdleConnections,
        keepAliveDuration = keepAliveDuration,
        timeUnit = timeUnit,
        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/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

       */
      private val connections = ConcurrentLinkedQueue<RealConnection>()
    
      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 {
    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)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        routePlanner: RoutePlanner? = null,
      ): RealConnectionPool {
        return RealConnectionPool(
          taskRunner = taskRunner,
          maxIdleConnections = maxIdleConnections,
          keepAliveDuration = 100L,
          timeUnit = TimeUnit.NANOSECONDS,
          connectionListener = ConnectionListener.NONE,
          exchangeFinderFactory = { pool, address, user ->
            FastFallbackExchangeFinder(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  4. CHANGELOG.md

        address. Use this to proactively open HTTP connections.
    
        Connections opened to fulfill this policy are subject to the connection pool's
        `keepAliveDuration` but do not count against the pool-wide `maxIdleConnections` limit.
    
        This feature increases the client's traffic and the load on the server. Talking to your server's
        operators before adopting it.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
Back to top