1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/tasks/v2/queue.proto 18 19 package com.google.cloud.tasks.v2; 20 21 public interface RetryConfigOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2.RetryConfig) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * Number of attempts per task. 31 * Cloud Tasks will attempt the task `max_attempts` times (that is, if the 32 * first attempt fails, then there will be `max_attempts - 1` retries). Must 33 * be >= -1. 34 * If unspecified when the queue is created, Cloud Tasks will pick the 35 * default. 36 * -1 indicates unlimited attempts. 37 * This field has the same meaning as 38 * [task_retry_limit in 39 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 40 * </pre> 41 * 42 * <code>int32 max_attempts = 1;</code> 43 * 44 * @return The maxAttempts. 45 */ getMaxAttempts()46 int getMaxAttempts(); 47 48 /** 49 * 50 * 51 * <pre> 52 * If positive, `max_retry_duration` specifies the time limit for 53 * retrying a failed task, measured from when the task was first 54 * attempted. Once `max_retry_duration` time has passed *and* the 55 * task has been attempted 56 * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no 57 * further attempts will be made and the task will be deleted. 58 * If zero, then the task age is unlimited. 59 * If unspecified when the queue is created, Cloud Tasks will pick the 60 * default. 61 * `max_retry_duration` will be truncated to the nearest second. 62 * This field has the same meaning as 63 * [task_age_limit in 64 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 65 * </pre> 66 * 67 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 68 * 69 * @return Whether the maxRetryDuration field is set. 70 */ hasMaxRetryDuration()71 boolean hasMaxRetryDuration(); 72 /** 73 * 74 * 75 * <pre> 76 * If positive, `max_retry_duration` specifies the time limit for 77 * retrying a failed task, measured from when the task was first 78 * attempted. Once `max_retry_duration` time has passed *and* the 79 * task has been attempted 80 * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no 81 * further attempts will be made and the task will be deleted. 82 * If zero, then the task age is unlimited. 83 * If unspecified when the queue is created, Cloud Tasks will pick the 84 * default. 85 * `max_retry_duration` will be truncated to the nearest second. 86 * This field has the same meaning as 87 * [task_age_limit in 88 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 89 * </pre> 90 * 91 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 92 * 93 * @return The maxRetryDuration. 94 */ getMaxRetryDuration()95 com.google.protobuf.Duration getMaxRetryDuration(); 96 /** 97 * 98 * 99 * <pre> 100 * If positive, `max_retry_duration` specifies the time limit for 101 * retrying a failed task, measured from when the task was first 102 * attempted. Once `max_retry_duration` time has passed *and* the 103 * task has been attempted 104 * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times, no 105 * further attempts will be made and the task will be deleted. 106 * If zero, then the task age is unlimited. 107 * If unspecified when the queue is created, Cloud Tasks will pick the 108 * default. 109 * `max_retry_duration` will be truncated to the nearest second. 110 * This field has the same meaning as 111 * [task_age_limit in 112 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 113 * </pre> 114 * 115 * <code>.google.protobuf.Duration max_retry_duration = 2;</code> 116 */ getMaxRetryDurationOrBuilder()117 com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder(); 118 119 /** 120 * 121 * 122 * <pre> 123 * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for 124 * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] 125 * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration 126 * after it fails, if the queue's 127 * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task 128 * should be retried. 129 * If unspecified when the queue is created, Cloud Tasks will pick the 130 * default. 131 * `min_backoff` will be truncated to the nearest second. 132 * This field has the same meaning as 133 * [min_backoff_seconds in 134 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 135 * </pre> 136 * 137 * <code>.google.protobuf.Duration min_backoff = 3;</code> 138 * 139 * @return Whether the minBackoff field is set. 140 */ hasMinBackoff()141 boolean hasMinBackoff(); 142 /** 143 * 144 * 145 * <pre> 146 * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for 147 * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] 148 * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration 149 * after it fails, if the queue's 150 * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task 151 * should be retried. 152 * If unspecified when the queue is created, Cloud Tasks will pick the 153 * default. 154 * `min_backoff` will be truncated to the nearest second. 155 * This field has the same meaning as 156 * [min_backoff_seconds in 157 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 158 * </pre> 159 * 160 * <code>.google.protobuf.Duration min_backoff = 3;</code> 161 * 162 * @return The minBackoff. 163 */ getMinBackoff()164 com.google.protobuf.Duration getMinBackoff(); 165 /** 166 * 167 * 168 * <pre> 169 * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for 170 * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] 171 * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration 172 * after it fails, if the queue's 173 * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task 174 * should be retried. 175 * If unspecified when the queue is created, Cloud Tasks will pick the 176 * default. 177 * `min_backoff` will be truncated to the nearest second. 178 * This field has the same meaning as 179 * [min_backoff_seconds in 180 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 181 * </pre> 182 * 183 * <code>.google.protobuf.Duration min_backoff = 3;</code> 184 */ getMinBackoffOrBuilder()185 com.google.protobuf.DurationOrBuilder getMinBackoffOrBuilder(); 186 187 /** 188 * 189 * 190 * <pre> 191 * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for 192 * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] 193 * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration 194 * after it fails, if the queue's 195 * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task 196 * should be retried. 197 * If unspecified when the queue is created, Cloud Tasks will pick the 198 * default. 199 * `max_backoff` will be truncated to the nearest second. 200 * This field has the same meaning as 201 * [max_backoff_seconds in 202 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 203 * </pre> 204 * 205 * <code>.google.protobuf.Duration max_backoff = 4;</code> 206 * 207 * @return Whether the maxBackoff field is set. 208 */ hasMaxBackoff()209 boolean hasMaxBackoff(); 210 /** 211 * 212 * 213 * <pre> 214 * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for 215 * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] 216 * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration 217 * after it fails, if the queue's 218 * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task 219 * should be retried. 220 * If unspecified when the queue is created, Cloud Tasks will pick the 221 * default. 222 * `max_backoff` will be truncated to the nearest second. 223 * This field has the same meaning as 224 * [max_backoff_seconds in 225 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 226 * </pre> 227 * 228 * <code>.google.protobuf.Duration max_backoff = 4;</code> 229 * 230 * @return The maxBackoff. 231 */ getMaxBackoff()232 com.google.protobuf.Duration getMaxBackoff(); 233 /** 234 * 235 * 236 * <pre> 237 * A task will be [scheduled][google.cloud.tasks.v2.Task.schedule_time] for 238 * retry between [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] 239 * and [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] duration 240 * after it fails, if the queue's 241 * [RetryConfig][google.cloud.tasks.v2.RetryConfig] specifies that the task 242 * should be retried. 243 * If unspecified when the queue is created, Cloud Tasks will pick the 244 * default. 245 * `max_backoff` will be truncated to the nearest second. 246 * This field has the same meaning as 247 * [max_backoff_seconds in 248 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 249 * </pre> 250 * 251 * <code>.google.protobuf.Duration max_backoff = 4;</code> 252 */ getMaxBackoffOrBuilder()253 com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder(); 254 255 /** 256 * 257 * 258 * <pre> 259 * The time between retries will double `max_doublings` times. 260 * A task's retry interval starts at 261 * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff], then doubles 262 * `max_doublings` times, then increases linearly, and finally 263 * retries retries at intervals of 264 * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] up to 265 * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. 266 * For example, if 267 * [min_backoff][google.cloud.tasks.v2.RetryConfig.min_backoff] is 10s, 268 * [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] is 300s, and 269 * `max_doublings` is 3, then the a task will first be retried in 270 * 10s. The retry interval will double three times, and then 271 * increase linearly by 2^3 * 10s. Finally, the task will retry at 272 * intervals of [max_backoff][google.cloud.tasks.v2.RetryConfig.max_backoff] 273 * until the task has been attempted 274 * [max_attempts][google.cloud.tasks.v2.RetryConfig.max_attempts] times. Thus, 275 * the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... 276 * If unspecified when the queue is created, Cloud Tasks will pick the 277 * default. 278 * This field has the same meaning as 279 * [max_doublings in 280 * queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters). 281 * </pre> 282 * 283 * <code>int32 max_doublings = 5;</code> 284 * 285 * @return The maxDoublings. 286 */ getMaxDoublings()287 int getMaxDoublings(); 288 } 289