=doc #15491 java circuit breaker doc update

This commit is contained in:
gfaerie 2014-07-03 18:41:58 +02:00
parent 5608abdb9a
commit 3b9ed6ac03

View file

@ -51,17 +51,15 @@ public class DangerousJavaActor extends UntypedActor {
if (message instanceof String) {
String m = (String) message;
if ("is my middle name".equals(m)) {
final Future<String> f = future(
new Callable<String>() {
public String call() {
return dangerousCall();
}
}, getContext().dispatcher());
pipe(breaker.callWithCircuitBreaker(
new Callable<Future<String>>() {
public Future<String> call() throws Exception {
return f;
return future(
new Callable<String>() {
public String call() {
return dangerousCall();
}
}, getContext().dispatcher());
}
}), getContext().dispatcher()).to(getSender());
}