Skip to content

Commit cbeba51

Browse files
committed
Minor javadoc improvements
1 parent 13b3530 commit cbeba51

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/main/java/dev/failsafe/CircuitBreaker.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public interface CircuitBreaker<R> extends Policy<R> {
6060
* CircuitBreakerBuilder#withFailureThreshold(int) single failure}, closes after a {@link
6161
* CircuitBreakerBuilder#withSuccessThreshold(int) single success}, and has a 1 minute {@link
6262
* CircuitBreakerBuilder#withDelay(Duration) delay}, unless configured otherwise.
63+
*
64+
* @see #ofDefaults()
6365
*/
6466
static <R> CircuitBreakerBuilder<R> builder() {
6567
return new CircuitBreakerBuilder<>();
@@ -76,6 +78,8 @@ static <R> CircuitBreakerBuilder<R> builder(CircuitBreakerConfig<R> config) {
7678
* Creates a count based CircuitBreaker that opens after a {@link CircuitBreakerBuilder#withFailureThreshold(int)
7779
* single failure}, closes after a {@link CircuitBreakerBuilder#withSuccessThreshold(int) single success}, and has a 1
7880
* minute {@link CircuitBreakerBuilder#withDelay(Duration) delay} by default.
81+
*
82+
* @see #builder()
7983
*/
8084
static <R> CircuitBreaker<R> ofDefaults() {
8185
return CircuitBreaker.<R>builder().build();
@@ -105,6 +109,7 @@ enum State {
105109
*
106110
* @throws CircuitBreakerOpenException Thrown when the circuit breaker is in a half-open state and no permits remain
107111
* according to the configured success or failure thresholding capacity.
112+
* @see #tryAcquirePermit()
108113
* @see #recordResult(Object)
109114
* @see #recordFailure(Throwable)
110115
* @see #recordSuccess()
@@ -116,7 +121,7 @@ default void acquirePermit() {
116121
}
117122

118123
/**
119-
* Attempts to acquire a permit to use the circuit breaker and returns whether a permit was acquired. Permission will
124+
* Tries to acquire a permit to use the circuit breaker and returns whether a permit was acquired. Permission will
120125
* be automatically released when a result or failure is recorded.
121126
*
122127
* @see #recordResult(Object)

src/main/java/dev/failsafe/RetryPolicy.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public interface RetryPolicy<R> extends Policy<R> {
3030
/**
3131
* Creates a RetryPolicyBuilder that by default will build a RetryPolicy that allows 3 execution attempts max with no
3232
* delay, unless configured otherwise.
33+
*
34+
* @see #ofDefaults()
3335
*/
3436
static <R> RetryPolicyBuilder<R> builder() {
3537
return new RetryPolicyBuilder<>();
@@ -44,6 +46,8 @@ static <R> RetryPolicyBuilder<R> builder(RetryPolicyConfig<R> config) {
4446

4547
/**
4648
* Creates a RetryPolicy that allows 3 execution attempts max with no delay.
49+
*
50+
* @see #builder()
4751
*/
4852
static <R> RetryPolicy<R> ofDefaults() {
4953
return RetryPolicy.<R>builder().build();

src/main/java/dev/failsafe/TimeoutBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* Builds {@link Timeout} instances.
2525
* <p>
26-
* This class is threadsafe.
26+
* This class is <i>not</i> threadsafe.
2727
* </p>
2828
*
2929
* @param <R> result type

0 commit comments

Comments
 (0)