MCPcopy Index your code
hub / github.com/grpc/grpc-java / withDeadlineAfter

Method withDeadlineAfter

api/src/context/java/io/grpc/Context.java:268–271  ·  view source on GitHub ↗

Create a new context which will cancel itself after the given duration from now. The returned context will cascade cancellation of its parent. Callers may explicitly cancel the returned context prior to the deadline just as for #withCancellation(). If the unit of work completes befor

(long duration, TimeUnit unit,
                                              ScheduledExecutorService scheduler)

Source from the content-addressed store, hash-verified

266 * </pre>
267 */
268 public CancellableContext withDeadlineAfter(long duration, TimeUnit unit,
269 ScheduledExecutorService scheduler) {
270 return withDeadline(Deadline.after(duration, unit), scheduler);
271 }
272
273 /**
274 * Create a new context which will cancel itself at the given {@link Deadline}.

Calls 2

withDeadlineMethod · 0.95
afterMethod · 0.95