- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for noNewExchanges (0.22 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
// Everything else wants a fresh connection. noNewExchangesEvent = !noNewExchanges noNewExchanges = true routeFailureCount++ } } } else if (!isMultiplexed || e is ConnectionShutdownException) { noNewExchangesEvent = !noNewExchanges noNewExchanges = true // If this route hasn't completed a call, avoid it for new connections.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 15.4K bytes - Viewed (0) -
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) -
okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
return ChunkedSource(url) } private fun newUnknownLengthSource(): Source { check(state == STATE_OPEN_RESPONSE_BODY) { "state: $state" } state = STATE_READING_RESPONSE_BODY carrier.noNewExchanges() return UnknownLengthSource() } /** * Sets the delegate of `timeout` to [Timeout.NONE] and resets its underlying timeout
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 16.2K bytes - Viewed (0) -
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) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt
val toClose: Socket? = candidate.withLock { when { !healthy -> { noNewExchangesEvent = !candidate.noNewExchanges candidate.noNewExchanges = true connectionUser.releaseConnectionNoEvents() } candidate.noNewExchanges || !sameHostAndPort(candidate.route().address.url) -> { connectionUser.releaseConnectionNoEvents() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 12K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
noNewExchangesEvent = !connection.noNewExchanges connection.noNewExchanges = true connectionUser.releaseConnectionNoEvents() } if (toClose != null) { toClose.closeQuietly() connectionListener.connectionClosed(connection) } else if (noNewExchangesEvent) { connectionListener.noNewExchanges(connection) } } return null }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 16.2K bytes - Viewed (0) -
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) -
okhttp/src/test/java/okhttp3/RouteFailureTest.kt
assertThat(server2.requestCount).isEqualTo(1) assertThat(clientTestRule.recordedConnectionEventTypes()).containsExactly( "ConnectStart", "ConnectEnd", "ConnectionAcquired", "NoNewExchanges", "ConnectionReleased", "ConnectionClosed", "ConnectStart", "ConnectEnd", "ConnectionAcquired", "ConnectionReleased", ) } @Test
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 11.9K bytes - Viewed (0) -
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) -
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)