Modifier and Type | Method | Description |
---|---|---|
static Deadline |
Deadline.after(long duration,
java.util.concurrent.TimeUnit units) |
Create a deadline that will expire at the specified offset based on the
system ticker . |
static Deadline |
Deadline.after(long duration,
java.util.concurrent.TimeUnit units,
Deadline.Ticker ticker) |
Create a deadline that will expire at the specified offset based on the given
Deadline.Ticker . |
Deadline |
Context.CancellableContext.getDeadline() |
|
Deadline |
Context.getDeadline() |
A context may have an associated
Deadline at which it will be automatically cancelled. |
Deadline |
Deadline.minimum(Deadline other) |
Return the minimum deadline of
this or an other deadline. |
Deadline |
Deadline.offset(long offset,
java.util.concurrent.TimeUnit units) |
Create a new deadline that is offset from
this . |
Modifier and Type | Method | Description |
---|---|---|
int |
Deadline.compareTo(Deadline that) |
|
boolean |
Deadline.isBefore(Deadline other) |
Is
this deadline before another. |
Deadline |
Deadline.minimum(Deadline other) |
Return the minimum deadline of
this or an other deadline. |
Context.CancellableContext |
Context.withDeadline(Deadline newDeadline,
java.util.concurrent.ScheduledExecutorService scheduler) |
Create a new context which will cancel itself at the given
Deadline . |