Deprecated method used in docs

Updated example code to use the alternative method provided in v2.5.0
This commit is contained in:
Ryan C. Hill 2018-02-16 16:15:13 -07:00 committed by GitHub
parent 28ae8d4f0e
commit acbf1ce7b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ public class DangerousJavaActor extends AbstractActor {
this.breaker = new CircuitBreaker( this.breaker = new CircuitBreaker(
getContext().dispatcher(), getContext().system().scheduler(), getContext().dispatcher(), getContext().system().scheduler(),
5, Duration.create(10, "s"), Duration.create(1, "m")) 5, Duration.create(10, "s"), Duration.create(1, "m"))
.onOpen(this::notifyMeOnOpen); .addOnOpenListener(this::notifyMeOnOpen);
} }
public void notifyMeOnOpen() { public void notifyMeOnOpen() {