Replaced Action with Directive in SupervisorStrategy. See #1716
This commit is contained in:
parent
4162372024
commit
2a4418799a
6 changed files with 44 additions and 44 deletions
|
|
@ -40,9 +40,9 @@ public class FaultHandlingTestBase {
|
|||
|
||||
//#strategy
|
||||
private static SupervisorStrategy strategy = new OneForOneStrategy(10, Duration.parse("1 minute"),
|
||||
new Function<Throwable, Action>() {
|
||||
new Function<Throwable, Directive>() {
|
||||
@Override
|
||||
public Action apply(Throwable t) {
|
||||
public Directive apply(Throwable t) {
|
||||
if (t instanceof ArithmeticException) {
|
||||
return resume();
|
||||
} else if (t instanceof NullPointerException) {
|
||||
|
|
@ -78,9 +78,9 @@ public class FaultHandlingTestBase {
|
|||
|
||||
//#strategy2
|
||||
private static SupervisorStrategy strategy = new OneForOneStrategy(10, Duration.parse("1 minute"),
|
||||
new Function<Throwable, Action>() {
|
||||
new Function<Throwable, Directive>() {
|
||||
@Override
|
||||
public Action apply(Throwable t) {
|
||||
public Directive apply(Throwable t) {
|
||||
if (t instanceof ArithmeticException) {
|
||||
return resume();
|
||||
} else if (t instanceof NullPointerException) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue