public final UnaryCallable<RenewLeaseRequest, Task> renewLeaseCallable() {
    return stub.renewLeaseCallable();
  }
Renew the current lease of a pull task.

<p>The worker can use this method to extend the lease by a new duration, starting from now. The
new task lease will be returned in the task's
[schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].

<p>Sample code:

<pre>{@code
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
  RenewLeaseRequest request =
      RenewLeaseRequest.newBuilder()
          .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]").toString())
          .setScheduleTime(Timestamp.newBuilder().build())
          .setLeaseDuration(Duration.newBuilder().build())
          .build();
  ApiFuture<Task> future = cloudTasksClient.renewLeaseCallable().futureCall(request);
  // Do something.
  Task response = future.get();
}
}</pre>
java-tasks/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java