-
Notifications
You must be signed in to change notification settings - Fork 223
/
com.azure.core.http.policy.ExponentialBackoffOptions.yml
109 lines (109 loc) · 8.91 KB
/
com.azure.core.http.policy.ExponentialBackoffOptions.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
### YamlMime:JavaType
uid: "com.azure.core.http.policy.ExponentialBackoffOptions"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions"
name: "ExponentialBackoffOptions"
nameWithType: "ExponentialBackoffOptions"
summary: "The `ExponentialBackoffOptions` class provides configuration options for the <xref uid=\"com.azure.core.http.policy.ExponentialBackoff\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoff\"></xref> retry strategy."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **ExponentialBackoffOptions**"
constructors:
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.ExponentialBackoffOptions()"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.ExponentialBackoffOptions()"
name: "ExponentialBackoffOptions()"
nameWithType: "ExponentialBackoffOptions.ExponentialBackoffOptions()"
summary: "Creates a new instance of <xref uid=\"com.azure.core.http.policy.ExponentialBackoffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoffOptions\"></xref>."
syntax: "public ExponentialBackoffOptions()"
desc: "Creates a new instance of <xref uid=\"com.azure.core.http.policy.ExponentialBackoffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoffOptions\"></xref>."
methods:
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.getBaseDelay()"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.getBaseDelay()"
name: "getBaseDelay()"
nameWithType: "ExponentialBackoffOptions.getBaseDelay()"
summary: "Gets the base delay duration for retry."
syntax: "public Duration getBaseDelay()"
desc: "Gets the base delay duration for retry."
returns:
description: "The base delay duration for retry."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.getMaxDelay()"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.getMaxDelay()"
name: "getMaxDelay()"
nameWithType: "ExponentialBackoffOptions.getMaxDelay()"
summary: "Gets the max delay duration for retry."
syntax: "public Duration getMaxDelay()"
desc: "Gets the max delay duration for retry."
returns:
description: "The max delay duration for retry."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.getMaxRetries()"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.getMaxRetries()"
name: "getMaxRetries()"
nameWithType: "ExponentialBackoffOptions.getMaxRetries()"
summary: "Gets the max retry attempts that can be made."
syntax: "public Integer getMaxRetries()"
desc: "Gets the max retry attempts that can be made."
returns:
description: "The max retry attempts that can be made."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>"
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.setBaseDelay(java.time.Duration)"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.setBaseDelay(Duration baseDelay)"
name: "setBaseDelay(Duration baseDelay)"
nameWithType: "ExponentialBackoffOptions.setBaseDelay(Duration baseDelay)"
summary: "Sets the base delay duration for retry."
parameters:
- description: "the base delay duration for retry."
name: "baseDelay"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public ExponentialBackoffOptions setBaseDelay(Duration baseDelay)"
desc: "Sets the base delay duration for retry."
returns:
description: "The updated <xref uid=\"com.azure.core.http.policy.ExponentialBackoffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoffOptions\"></xref>"
type: "<xref href=\"com.azure.core.http.policy.ExponentialBackoffOptions?alt=com.azure.core.http.policy.ExponentialBackoffOptions&text=ExponentialBackoffOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.setMaxDelay(java.time.Duration)"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.setMaxDelay(Duration maxDelay)"
name: "setMaxDelay(Duration maxDelay)"
nameWithType: "ExponentialBackoffOptions.setMaxDelay(Duration maxDelay)"
summary: "Sets the max delay duration for retry."
parameters:
- description: "the max delay duration for retry."
name: "maxDelay"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public ExponentialBackoffOptions setMaxDelay(Duration maxDelay)"
desc: "Sets the max delay duration for retry."
returns:
description: "The updated <xref uid=\"com.azure.core.http.policy.ExponentialBackoffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoffOptions\"></xref>"
type: "<xref href=\"com.azure.core.http.policy.ExponentialBackoffOptions?alt=com.azure.core.http.policy.ExponentialBackoffOptions&text=ExponentialBackoffOptions\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.http.policy.ExponentialBackoffOptions.setMaxRetries(java.lang.Integer)"
fullName: "com.azure.core.http.policy.ExponentialBackoffOptions.setMaxRetries(Integer maxRetries)"
name: "setMaxRetries(Integer maxRetries)"
nameWithType: "ExponentialBackoffOptions.setMaxRetries(Integer maxRetries)"
summary: "Sets the max retry attempts that can be made."
parameters:
- description: "the max retry attempts that can be made."
name: "maxRetries"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>"
syntax: "public ExponentialBackoffOptions setMaxRetries(Integer maxRetries)"
desc: "Sets the max retry attempts that can be made."
returns:
description: "The updated <xref uid=\"com.azure.core.http.policy.ExponentialBackoffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoffOptions\"></xref>"
type: "<xref href=\"com.azure.core.http.policy.ExponentialBackoffOptions?alt=com.azure.core.http.policy.ExponentialBackoffOptions&text=ExponentialBackoffOptions\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "The `ExponentialBackoffOptions` class provides configuration options for the <xref uid=\"com.azure.core.http.policy.ExponentialBackoff\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ExponentialBackoff\"></xref> retry strategy. This strategy uses a delay duration that exponentially increases with each retry attempt until an upper bound is reached. After reaching the upper bound, every retry attempt is delayed by the provided max delay duration.\n\nThis class is useful when you need to customize the behavior of the exponential backoff strategy. It allows you to specify the maximum number of retry attempts, the base delay duration, and the maximum delay duration.\n\n**Code sample:**\n\nIn this example, an `ExponentialBackoffOptions` is created and used to configure an `ExponentialBackoff` retry strategy. The strategy is then used in a `RetryPolicy` which can then be added to a pipeline. For a request then sent by the pipeline, if the server responds with a transient error, the request will be retried with an exponentially increasing delay.\n\n```java\nExponentialBackoffOptions options = new ExponentialBackoffOptions().setMaxRetries(5)\n .setBaseDelay(Duration.ofSeconds(1))\n .setMaxDelay(Duration.ofSeconds(10));\n\n ExponentialBackoff retryStrategy = new ExponentialBackoff(options);\n```"
metadata: {}
package: "com.azure.core.http.policy"
artifact: com.azure:azure-core:1.49.1