- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 23 for evictAll (0.16 sec)
-
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
builder.eventListenerFactory(LoggingEventListener.Factory(logger)) } return builder.build() } fun close() { val okHttpClient = client as OkHttpClient okHttpClient.connectionPool.evictAll() // Close any persistent connections. okHttpClient.dispatcher.executorService.shutdownNow() } companion object { internal const val NAME = "okcurl" internal const val DEFAULT_TIMEOUT = -1
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt
sendTestRequest(twitterRequest) Thread.sleep(1000) sendTestRequest(googleRequest) Thread.sleep(2000) } } finally { client.connectionPool.evictAll() client.dispatcher.executorService.shutdownNow() if (launch == CommandLine) { process?.destroyForcibly() } } } private fun sendTestRequest(request: Request) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/JSSETest.kt
client.newCall(request).execute().use { assertThat(it.protocol).isEqualTo(Protocol.HTTP_2) assertThat(it.handshake!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3) } client.connectionPool.evictAll() assertEquals(0, client.connectionPool.connectionCount()) client.newCall(request).execute().use { assertThat(it.protocol).isEqualTo(Protocol.HTTP_2)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 5.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
/** * Deletes all values stored in the cache. In-flight writes to the cache will complete normally, * but the corresponding responses will not be stored. */ @Throws(IOException::class) fun evictAll() { cache.evictAll() } /** * Returns an iterator over the URLs in this cache. This iterator doesn't throw * `ConcurrentModificationException`, but if new responses are added while iterating, their URLs
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
if (connections.isEmpty()) cleanupQueue.cancelAll() scheduleOpener(connection.route.address) true } else { scheduleCloser() false } } fun evictAll() { val i = connections.iterator() while (i.hasNext()) { val connection = i.next() val socketToClose = connection.withLock { if (connection.calls.isEmpty()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
.build() val response = get(url) assertThat(response.body.string()).isEqualTo(entryBody) assertThat(response.header("Content-Length")).isEqualTo("3") } @Test fun evictAll() { server.enqueue( MockResponse.Builder() .addHeader("Cache-Control: max-age=60") .body("A") .build(), ) server.enqueue( MockResponse.Builder()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
policy: ConnectionPool.AddressPolicy, ) { pool.setPolicy(address, policy) taskFaker.runTasks() } private fun evictAllConnections(pool: RealConnectionPool) { pool.evictAll() assertThat(pool.connectionCount()).isEqualTo(0) taskFaker.runTasks() } private fun forceConnectionsToExpire( pool: RealConnectionPool, expireTime: Long, ) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jun 22 16:06:35 UTC 2024 - 12.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
* * ```java * client.dispatcher().executorService().shutdown(); * ``` * * Clear the connection pool with [evictAll()][ConnectionPool.evictAll]. Note that the connection * pool's daemon thread may not exit immediately. * * ```java * client.connectionPool().evictAll(); * ``` * * If your client has a cache, call [close()][Cache.close]. Note that it is an error to create calls
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:21:33 UTC 2024 - 52K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
} @Test fun cache() { val cache = Cache(File("/cache/"), Integer.MAX_VALUE.toLong()) cache.initialize() cache.delete() cache.evictAll() val urls: MutableIterator<String> = cache.urls() val writeAbortCount: Int = cache.writeAbortCount() val writeSuccessCount: Int = cache.writeSuccessCount() val size: Long = cache.size()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
) val response1 = call1.execute() assertThat(response1.body.string()).isEqualTo("abc") response1.close() // Force a fresh connection for the next request. client.connectionPool.evictAll() // Confirm that a second request also succeeds. This should detect caching problems. server.enqueue( MockResponse.Builder() .body("def") .socketPolicy(DisconnectAtEnd)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.8K bytes - Viewed (0)