Returns a new CallOptions with the given absolute deadline. This is mostly used for propagating an existing deadline. #withDeadlineAfter is the recommended way of setting a new deadline, @param deadline the deadline or null for unsetting the deadline.
(@Nullable Deadline deadline)
| 165 | * @param deadline the deadline or {@code null} for unsetting the deadline. |
| 166 | */ |
| 167 | public CallOptions withDeadline(@Nullable Deadline deadline) { |
| 168 | Builder builder = toBuilder(this); |
| 169 | builder.deadline = deadline; |
| 170 | return builder.build(); |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Returns a new {@code CallOptions} with a deadline that is after the given {@code duration} from |