It is guaranteed that the leased tasks will be unavailable for lease to others in the lease period. You must call deleteTask to prevent the task from being leased again after the lease period. This method supports leasing a maximum of 1000 tasks for no more than one week. @param lease Number of {@code unit}s in the lease period @param unit Time unit of the lease period @param countLimit maximum number of tasks to lease @param tag User defined {@code String} tag required for returned tasks. If {@code null}, the tag of the task with earliest eta will be used. @return A list of {@link TaskHandle} for each leased task. @throws InvalidQueueModeException if the target queue is not in pull mode. @throws IllegalArgumentException if lease < 0, countLimit <= 0 or either is too large. @throws InternalFailureException @throws IllegalStateException If the queue does not exist. (see queue.xml) @throws TransientFailureException Attempting the request after this exception may succeed.
|
|