Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for noNewExchanges (0.54 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

          if (connection.noNewExchanges) {
            assertThat(eventSequence).matchesPredicate { deque ->
              deque.any { it is NoNewExchanges && it.connection == connection }
            }
          }
        }
    
        logEvent(ConnectionEvent.ConnectionReleased(System.nanoTime(), connection, call))
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

      }
    
      override fun connectionConnectionClosed(connection: RealConnection) {
        connection.connectionListener.connectionClosed(connection)
      }
    
      override fun noNewExchanges(connection: RealConnection) {
        connection.connectionListener.noNewExchanges(connection)
      }
    
      override fun doExtensiveHealthChecks(): Boolean {
        return chain.request.method != "GET"
      }
    
      override fun isCanceled(): Boolean {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectionUser.kt

      fun connectionConnectionAcquired(connection: RealConnection)
    
      fun connectionConnectionReleased(connection: RealConnection)
    
      fun connectionConnectionClosed(connection: RealConnection)
    
      fun noNewExchanges(connection: RealConnection)
    
      fun doExtensiveHealthChecks(): Boolean
    
      fun isCanceled(): Boolean
    
      fun candidateConnection(): RealConnection?
    
      fun proxySelectStart(url: HttpUrl)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt

       */
      interface Carrier {
        val route: Route
    
        fun trackFailure(
          call: RealCall,
          e: IOException?,
        )
    
        fun noNewExchanges()
    
        fun cancel()
      }
    
      companion object {
        /**
         * The timeout to use while discarding a stream of input data. Since this is used for connection
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/ConnectionListener.kt

       */
      open fun connectionReleased(
        connection: Connection,
        call: Call,
      ) {}
    
      /**
       * Invoked when a connection is marked for no new exchanges.
       */
      open fun noNewExchanges(connection: Connection) {}
    
      @ExperimentalOkHttpApi
      companion object {
        val NONE: ConnectionListener = object : ConnectionListener() {}
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/PoolConnectionUser.kt

      }
    
      override fun connectionConnectionReleased(connection: RealConnection) {
      }
    
      override fun connectionConnectionClosed(connection: RealConnection) {
      }
    
      override fun noNewExchanges(connection: RealConnection) {
      }
    
      override fun doExtensiveHealthChecks(): Boolean = false
    
      override fun isCanceled(): Boolean = false
    
      override fun candidateConnection(): RealConnection? = null
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/ConnectionEvent.kt

        val call: Call,
      ) : ConnectionEvent() {
        override fun closes(event: ConnectionEvent): Boolean =
          event is ConnectionAcquired && connection == event.connection && call == event.call
      }
    
      data class NoNewExchanges(
        override val timestampNs: Long,
        override val connection: Connection,
      ) : ConnectionEvent()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

      }
    
      fun webSocketUpgradeFailed() {
        bodyComplete(-1L, responseDone = true, requestDone = true, e = null)
      }
    
      fun noNewExchangesOnConnection() {
        codec.carrier.noNewExchanges()
      }
    
      fun cancel() {
        codec.cancel()
      }
    
      /**
       * Revoke this exchange's access to streams. This is necessary when a follow-up request is
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.2K bytes
    - Viewed (2)
  9. docs/contribute/concurrency.md

    #### Per-Connection Locks
    
    Each connection has its own lock. The connections in the pool are all in a `ConcurrentLinkedQueue`. Due to data races, iterators of this queue may return removed connections. Callers must check the connection's `noNewExchanges` property before using connections from the pool.
    
    The connection lock is never held while doing I/O (even closing a socket) to prevent contention.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionListenerTest.kt

        }
        assertThat(listener.recordedEventTypes()).containsExactly(
          "ConnectStart",
          "ConnectEnd",
          "ConnectionAcquired",
          "NoNewExchanges",
          "ConnectionReleased",
          "ConnectionClosed",
        )
      }
    
      @Throws(IOException::class)
      private fun assertSuccessfulEventOrder() {
        val call =
          client.newCall(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.6K bytes
    - Viewed (0)
Back to top