-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathExponentialBackoffRetry.java
More file actions
44 lines (41 loc) · 1.2 KB
/
ExponentialBackoffRetry.java
File metadata and controls
44 lines (41 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.functions.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* <p>
* Defines an exponential backoff retry strategy, where the delay between retries
* will get progressively larger, limited by the max/min specified.</p>
*
* @since 1.0.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ExponentialBackoffRetry {
/**
* The strategy of retries that will be used internally.
* @return The strategy of retries.
*/
String strategy() default "exponentialBackoff";
/**
* The maximum number of retries that will be attempted.
* @return The maximum retry count.
*/
int maxRetryCount();
/**
* The minimum delay interval.
* @return The minimum retry delay.
*/
String minimumInterval();
/**
* The maximum delay interval.
* @return The maximum retry delay.
*/
String maximumInterval();
}