- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 597 for calc (0.01 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt
.build() val startNanos = System.nanoTime() val call = client.newCall(request) // Schedule a job to cancel the call in 1 second. executor.schedule({ System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f) call.cancel() System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f) }, 1, TimeUnit.SECONDS)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
public void testReturning() throws Exception { assertNull(Callables.returning(null).call()); Object value = new Object(); Callable<Object> callable = Callables.returning(value); assertSame(value, callable.call()); // Expect the same value on subsequent calls assertSame(value, callable.call()); } @J2ktIncompatible @GwtIncompatible public void testAsAsyncCallable() throws Exception {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 60.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt
@ValueSource(booleans = [true, false]) fun successfulCallEventSequence() { server!!.enqueue(MockResponse(body = "abc")) val call = client.newCall( Request .Builder() .url(server!!.url("/")) .build(), ) val response = call.execute() assertThat(response.code).isEqualTo(200) assertThat(response.body.string()).isEqualTo("abc") response.body.close()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 9.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 6.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/CallConnectionUser.kt
call.plansToCancel -= connectPlan } override fun updateRouteDatabaseAfterSuccess(route: Route) { call.client.routeDatabase.connected(route) } override fun connectStart(route: Route) { eventListener.connectStart(call, route.socketAddress, route.proxy) poolConnectionListener.connectStart(route, call) } override fun connectFailed( route: Route, protocol: Protocol?,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 4.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt
val client = OkHttpClient .Builder() .connectionPool(poolApi) .build() val call = client.newCall(Request(addressA.url)) as RealCall call.enterNetworkInterceptorExchange(call.request(), true, factory.newChain(call)) c1.withLock { call.acquireConnectionNoEvents(c1) } // Running at time 50, the pool returns that nothing can be evicted until time 150.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 12.9K bytes - Viewed (0) -
okhttp-coroutines/src/main/kotlin/okhttp3/coroutines/ExecuteAsync.kt
object : Callback { override fun onFailure( call: Call, e: IOException, ) { continuation.resumeWithException(e) } override fun onResponse( call: Call, response: Response, ) { continuation.resume(response) { _, value, _ -> value.closeQuietly() } } }, )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jun 19 04:20:30 UTC 2025 - 1.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
.trailersDelay(1, TimeUnit.SECONDS) .build(), ) val call = client.newCall(Request(server.url("/"))) call.execute().use { response -> val source = response.body.source() assertThat(response.header("h1")).isEqualTo("v1") assertThat(source.readUtf8(5)).isEqualTo("Hello") call.cancelLater(500.milliseconds) val trailersDelay = measureTime {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 18K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/opensearch/config/bsbhv/BsCrawlingInfoBhv.java
public int[] batchInsert(List<CrawlingInfo> list, RequestOptionCall<BulkRequestBuilder> call) { return batchInsert(list, call, null); } public int[] batchInsert(List<CrawlingInfo> list, RequestOptionCall<BulkRequestBuilder> call, RequestOptionCall<IndexRequestBuilder> entityCall) { return doBatchInsert(new BulkList<>(list, call, entityCall), null); }
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Sat Mar 15 06:53:53 UTC 2025 - 9.5K bytes - Viewed (0)