- cancelTimer = actor.getContext().system().scheduler().scheduleOnce(timeout, actor.self(), new Runnable() {
- @Override
- public void run() {
- cancel();
- }
- }, actor.getContext().system().dispatcher(), actor.self());
+ cancelTimer = actor.getContext().system().scheduler().scheduleOnce(timeout, actor.self(),
+ (Runnable) this::cancel, actor.getContext().system().dispatcher(), actor.self());