Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
readme cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
elennick committed Feb 10, 2018
1 parent 74d725d commit 7e471a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ Callable<Object> callable = () -> {
//the call exhausted all tries without succeeding
} catch(UnexpectedException ue) {
//the call threw an unexpected exception
}```
}
```

Or more simple using one of the predefined config options and not checking exceptions:

Expand All @@ -63,7 +64,8 @@ RetryConfig config = new RetryConfigBuilder()
.exponentialBackoff5Tries5Sec()
.build();

Status<Object> status = new CallExecutor(config).execute(callable);```
Status<Object> status = new CallExecutor(config).execute(callable);
```

### Handling Results With Listeners

Expand Down Expand Up @@ -321,7 +323,8 @@ System.out.println(status.getLastExceptionThatCausedRetry());

or

```javatry {
```java
try {
new CallExecutor(config).execute(callable);
} catch(RetriesExhaustedException cfe) {
Status status = cfe.getStatus();
Expand All @@ -330,7 +333,8 @@ or
System.out.println(status.getTotalDurationElapsed());
System.out.println(status.getTotalTries());
System.out.println(status.getLastExceptionThatCausedRetry());
}```
}
```

### Retry4jException

Expand Down

0 comments on commit 7e471a5

Please sign in to comment.