MCPcopy Create free account
hub / github.com/traneio/future / within

Method within

future-java/src/main/java/io/trane/future/Future.java:577–577  ·  view source on GitHub ↗

Creates a future that fails with a TimeoutException if this future isn't completed within the timeout. @param timeout how long to wait for the result @param timeUnit the time unit of timeout. @param scheduler used to schedule an internal task after the timeout. @return a future that

(final Duration timeout, final ScheduledExecutorService scheduler)

Source from the content-addressed store, hash-verified

575 * timeout, a failed future otherwise.
576 */
577 default Future<T> within(final Duration timeout, final ScheduledExecutorService scheduler) {
578 return within(timeout, scheduler, TimeoutException.stackless);
579 }
580

Callers 12

withinFailureMethod · 0.65
withinSuccessMethod · 0.65
withinMaxLongWaitMethod · 0.65
withinPromiseSuccessMethod · 0.65
withinPromiseFailureMethod · 0.65
withinPromiseTimeoutMethod · 0.65
withinInterruptMethod · 0.65
genMethod · 0.65
withinMethod · 0.65

Calls

no outgoing calls

Tested by 12

withinFailureMethod · 0.52
withinSuccessMethod · 0.52
withinMaxLongWaitMethod · 0.52
withinPromiseSuccessMethod · 0.52
withinPromiseFailureMethod · 0.52
withinPromiseTimeoutMethod · 0.52
withinInterruptMethod · 0.52
genMethod · 0.52
withinMethod · 0.52