- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for evictAll (0.09 sec)
-
okhttp/src/test/java/okhttp3/TestTls13Request.kt
client: OkHttpClient, ) { try { for (url in urls) { sendRequest(client, url) } } finally { client.dispatcher.executorService.shutdownNow() client.connectionPool.evictAll() } } private fun buildClient(vararg specs: ConnectionSpec): OkHttpClient { return OkHttpClient.Builder() .connectionSpecs(listOf(*specs)) .build() } private fun sendRequest(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http/ExternalHttp2Example.kt
var line: String? while (response.body.source().readUtf8Line().also { line = it } != null) { println(line) } } finally { response.body.close() } client.connectionPool.evictAll() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
docs/features/caching.md
which is designed to persist between app restarts. ```kotlin cache.delete() ``` ## Pruning the Cache Pruning the entire Cache to clear space temporarily can be done using evictAll. ```kotlin cache.evictAll() ``` Removing individual items can be done using the urls iterator. This would be typical after a user initiates a force refresh by a pull to refresh type action. ```java
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 3.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt
internal val connectionListener: ConnectionListener get() = delegate.connectionListener /** Close and remove all idle connections in the pool. */ fun evictAll() { delegate.evictAll() } /** * Sets a policy that applies to [address]. * Overwrites any existing policy for that address. */ @ExperimentalOkHttpApi fun setPolicy( address: Address,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 03 20:39:41 UTC 2024 - 5.6K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt
client = bootstrapClient, http2Only = true, workingOnly = true, getOnly = true, ) runBatch(dnsProviders, names) } finally { bootstrapClient.connectionPool.evictAll() bootstrapClient.dispatcher.executorService.shutdownNow() bootstrapClient.cache?.close() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java
.build(); }; private final OkHttpClient client; public RewriteResponseCacheControl(File cacheDirectory) throws Exception { Cache cache = new Cache(cacheDirectory, 1024 * 1024); cache.evictAll(); client = new OkHttpClient.Builder() .cache(cache) .build(); } public void run() throws Exception { for (int i = 0; i < 5; i++) { System.out.println(" Request: " + i);
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 2.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SessionReuseTest.kt
val request = Request(server.url("/")) client.newCall(request).execute().use { response -> assertEquals(200, response.code) } client.connectionPool.evictAll() assertEquals(0, client.connectionPool.connectionCount()) // Force reuse. This appears flaky (30% of the time) even though sessions are reused.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0) -
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) -
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)