Packages

c

akka.japi.pf

DeciderBuilder

class DeciderBuilder extends AnyRef

Used for building a partial function for Actor.supervisorStrategy(). * Inside an actor you can use it like this with Java 8 to define your supervisorStrategy.

Example:

@Override
private static SupervisorStrategy strategy =
  new OneForOneStrategy(10, Duration.ofMinutes(1), DeciderBuilder.
    match(ArithmeticException.class, e -> resume()).
    match(NullPointerException.class, e -> restart()).
    match(IllegalArgumentException.class, e -> stop()).
    matchAny(o -> escalate()).build());

@Override
public SupervisorStrategy supervisorStrategy() {
  return strategy;
}

Source
DeciderBuilder.java
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeciderBuilder
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All