Skip to content

Commit 8fa0904

Browse files
committed
Document that the maxWaitTime setting on policies only applies when using the Failsafe class
1 parent 6c6293a commit 8fa0904

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

core/src/main/java/dev/failsafe/BulkheadBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public Bulkhead<R> build() {
5050
/**
5151
* Configures the {@code maxWaitTime} to wait for permits to be available. If permits cannot be acquired before the
5252
* {@code maxWaitTime} is exceeded, then the bulkhead will throw {@link BulkheadFullException}.
53+
* <p>
54+
* This setting only applies when the resulting Bulkhead is used with the {@link Failsafe} class. It does not apply
55+
* when the Bulkhead is used in a standalone way.
56+
* </p>
5357
*
5458
* @throws NullPointerException if {@code maxWaitTime} is null
5559
*/

core/src/main/java/dev/failsafe/BulkheadConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public int getMaxConcurrency() {
5050
/**
5151
* Returns the max time to wait for permits to be available. If permits cannot be acquired before the max wait time is
5252
* exceeded, then the bulkhead will throw {@link BulkheadFullException}.
53+
* <p>
54+
* This setting only applies when the Bulkhead is used with the {@link Failsafe} class. It does not apply when the
55+
* Bulkhead is used in a standalone way.
56+
* </p>
5357
*
5458
* @see BulkheadBuilder#withMaxWaitTime(Duration)
5559
*/

core/src/main/java/dev/failsafe/RateLimiterBuilder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import dev.failsafe.internal.util.Assert;
2020

2121
import java.time.Duration;
22-
import java.time.temporal.ChronoUnit;
2322

2423
/**
2524
* Builds {@link RateLimiter} instances.
@@ -57,6 +56,10 @@ public RateLimiter<R> build() {
5756
/**
5857
* Configures the {@code maxWaitTime} to wait for permits to be available. If permits cannot be acquired before the
5958
* {@code maxWaitTime} is exceeded, then the rate limiter will throw {@link RateLimitExceededException}.
59+
* <p>
60+
* This setting only applies when the resulting RateLimiter is used with the {@link Failsafe} class. It does not apply
61+
* when the RateLimiter is used in a standalone way.
62+
* </p>
6063
*
6164
* @throws NullPointerException if {@code maxWaitTime} is null
6265
*/

core/src/main/java/dev/failsafe/RateLimiterConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ public Duration getPeriod() {
8585
/**
8686
* Returns the max time to wait for permits to be available. If permits cannot be acquired before the max wait time is
8787
* exceeded, then the rate limiter will throw {@link RateLimitExceededException}.
88+
* <p>
89+
* This setting only applies when the RateLimiter is used with the {@link Failsafe} class. It does not apply when the
90+
* RateLimiter is used in a standalone way.
91+
* </p>
8892
*
8993
* @see RateLimiterBuilder#withMaxWaitTime(Duration)
9094
*/

0 commit comments

Comments
 (0)