Skip to content

Commit

Permalink
Merge pull request #94 from agebhar1/feature/README.md
Browse files Browse the repository at this point in the history
README.md fix snippets
  • Loading branch information
jhalterman committed May 24, 2017
2 parents b1e784a + b06b5d2 commit 96fd15b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ A policy can allow retries on particular failures:

```java
RetryPolicy retryPolicy = new RetryPolicy()
.retryOn(ConnectException.class, SocketException.class);
.retryOn(ConnectException.class, SocketException.class)
.retryOn(failure -> failure instanceof ConnectException);
```

And for particular results or conditions:

```java
retryPolicy
.retryWhen(null);
.retryWhen(null)
.retryIf(result -> result == null);
```

Expand Down Expand Up @@ -343,7 +343,7 @@ Failsafe.with(retryPolicy)
Failsafe.with(retryPolicy)
.with(executor)
.onFailureAsync(e -> log.error("Failed to create connection", e))
.onSuccessAsync(cxn -> log.info("Connected to {}", cxn), anotherExecutor);
.onSuccessAsync(cxn -> log.info("Connected to {}", cxn), anotherExecutor)
.get(this::connect);
```

Expand Down

0 comments on commit 96fd15b

Please sign in to comment.