Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for AddressPolicy (0.27 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        val address = routePlanner.address
        val pool = routePlanner.pool
    
        // Connections are created as soon as a policy is set
        setPolicy(pool, address, ConnectionPool.AddressPolicy(2))
        assertThat(pool.connectionCount()).isEqualTo(2)
    
        // Connections are replaced if they idle out or are evicted from the pool
        evictAllConnections(pool)
        assertThat(pool.connectionCount()).isEqualTo(2)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt

       */
      @ExperimentalOkHttpApi
      fun setPolicy(
        address: Address,
        policy: AddressPolicy,
      ) {
        delegate.setPolicy(address, policy)
      }
    
      /**
       * A policy for how the pool should treat a specific address.
       */
      class AddressPolicy(
        /**
         * How many concurrent calls should be possible to make at any time.
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

    import okio.IOException
    
    class RealConnectionPool(
      private val taskRunner: TaskRunner,
      /**
       * The maximum number of idle connections across all addresses.
       * Connections needed to satisfy a [ConnectionPool.AddressPolicy] are not considered idle.
       */
      private val maxIdleConnections: Int,
      keepAliveDuration: Long,
      timeUnit: TimeUnit,
      internal val connectionListener: ConnectionListener,
    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/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
    	public final field backoffJitterMillis I
    	public final field minimumConcurrentCalls I
    	public fun <init> ()V
    	public fun <init> (IJI)V
    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)
Back to top