Modifier and Type | Method and Description |
---|---|
Context.CancellableContext |
Context.withCancellation()
Create a new context which is independently cancellable and also cascades cancellation from
its parent.
|
Context.CancellableContext |
Context.withDeadline(Deadline newDeadline,
java.util.concurrent.ScheduledExecutorService scheduler)
Create a new context which will cancel itself at the given
Deadline . |
Context.CancellableContext |
Context.withDeadlineAfter(long duration,
java.util.concurrent.TimeUnit unit,
java.util.concurrent.ScheduledExecutorService scheduler)
Create a new context which will cancel itself after the given
duration from now. |