- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 255 for relay (0.17 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
file!!.channel.force(false) // This file is complete. synchronized(this@Relay) { complete = true } upstream?.closeQuietly() upstream = null } fun metadata(): ByteString = metadata /** * Returns a new source that returns the same bytes as upstream. Returns null if this relay has * been closed and no further sources are possible. In that case callers should retry after
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
upstream.writeUtf8("abcde") val relay = edit(file, upstream, metadata, 1024) val source1 = relay.newSource() val source2 = relay.newSource() source1!!.close() source1.close() // Unnecessary. Shouldn't decrement the reference count. assertThat(relay.isClosed).isFalse() source2!!.close() assertThat(relay.isClosed).isTrue() assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null) }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
rateLimiter.acquire(1); // R1.00, to repay previous rateLimiter.setRate(2.0); // update the rate! rateLimiter.acquire(1); // R1.00, to repay previous (the previous was under the old rate!) rateLimiter.acquire(2); // R0.50, to repay previous (now the rate takes effect) rateLimiter.acquire(4); // R1.00, to repay previous rateLimiter.acquire(1); // R2.00, to repay previous
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
rateLimiter.acquire(1); // R1.00, to repay previous rateLimiter.setRate(2.0); // update the rate! rateLimiter.acquire(1); // R1.00, to repay previous (the previous was under the old rate!) rateLimiter.acquire(2); // R0.50, to repay previous (now the rate takes effect) rateLimiter.acquire(4); // R1.00, to repay previous rateLimiter.acquire(1); // R2.00, to repay previous
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
assertTrue(tryAcquireUninterruptibly(semaphore, LONG_DELAY_MS, MILLISECONDS)); assertTimeNotPassed(stopwatch, LONG_DELAY_MS); } public void testTryAcquireTimeoutNoInterruptNotExpired() { TimedSemaphore semaphore = TimedSemaphore.createWithDelay(20); semaphore.tryAcquireSuccessfully(LONG_DELAY_MS); assertNotInterrupted(); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 31.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
public String call() throws InterruptedException { MILLISECONDS.sleep(DELAY_MS); return GOOD_CALLABLE_RESULT; } }; private static final Callable<String> BAD_CALLABLE = new Callable<String>() { @Override public String call() throws InterruptedException, SampleException { MILLISECONDS.sleep(DELAY_MS); throw new SampleException(); } };
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java
boolean called = false; private void assertSingleCallWithCorrectParameters( Runnable command, long initialDelay, long delay, TimeUnit unit) { assertFalse(called); // only called once. called = true; assertEquals(INITIAL_DELAY, initialDelay); assertEquals(DELAY, delay); assertEquals(UNIT, unit); assertEquals(testRunnable, command); } public void testFixedRateSchedule() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 22.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
SMALL_DELAY_MS = SHORT_DELAY_MS * 5; MEDIUM_DELAY_MS = SHORT_DELAY_MS * 10; LONG_DELAY_MS = SHORT_DELAY_MS * 200; } /** * Returns a timeout in milliseconds to be used in tests that verify that operations block or time * out. */ long timeoutMillis() { return SHORT_DELAY_MS / 4; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 37.2K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
* A value object that represents an absolute delay until a task should be invoked. * * @author Luke Sandberg * @since 11.0 */ protected static final class Schedule { private final long delay; private final TimeUnit unit; /** * @param delay the time from now to delay execution * @param unit the time unit of the delay parameter */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Dec 13 19:45:20 GMT 2023 - 25.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
public String call() throws InterruptedException { MILLISECONDS.sleep(DELAY_MS); return GOOD_CALLABLE_RESULT; } }; private static final Callable<String> BAD_CALLABLE = new Callable<String>() { @Override public String call() throws InterruptedException, SampleException { MILLISECONDS.sleep(DELAY_MS); throw new SampleException(); } };
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0)