@@ -99,6 +99,8 @@ private Builder() {
99
99
100
100
/**
101
101
* Specify the maximum number of retry attempts.
102
+ * <p>If a {@code maxAttempts} value has already been configured, the
103
+ * supplied value will override the existing value.
102
104
* @param maxAttempts the maximum number of retry attempts; must be
103
105
* greater than zero
104
106
* @return this {@code Builder} instance for chained method invocations
@@ -111,6 +113,8 @@ public Builder maxAttempts(int maxAttempts) {
111
113
112
114
/**
113
115
* Specify the maximum retry {@link Duration}.
116
+ * <p>If a {@code maxDuration} value has already been configured, the
117
+ * supplied value will override the existing value.
114
118
* @param maxDuration the maximum retry duration; must be positive
115
119
* @return this {@code Builder} instance for chained method invocations
116
120
*/
@@ -123,6 +127,9 @@ public Builder maxDuration(Duration maxDuration) {
123
127
/**
124
128
* Specify the types of exceptions for which the {@link RetryPolicy}
125
129
* should retry a failed operation.
130
+ * <p>Defaults to all exception types.
131
+ * <p>If included exception types have already been configured, the supplied
132
+ * types will be added to the existing list of included types.
126
133
* <p>This can be combined with {@link #excludes(Class...)} and
127
134
* {@link #predicate(Predicate)}.
128
135
* @param types the types of exceptions to include in the policy
@@ -138,6 +145,8 @@ public final Builder includes(Class<? extends Throwable>... types) {
138
145
/**
139
146
* Specify the types of exceptions for which the {@link RetryPolicy}
140
147
* should not retry a failed operation.
148
+ * <p>If excluded exception types have already been configured, the supplied
149
+ * types will be added to the existing list of excluded types.
141
150
* <p>This can be combined with {@link #includes(Class...)} and
142
151
* {@link #predicate(Predicate)}.
143
152
* @param types the types of exceptions to exclude from the policy
0 commit comments