Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for idleConnectionCount (0.21 sec)

  1. 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)
  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() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
Back to top