In Akka 2.5.12 there is a method:
And this works
CompletionStage<Terminated> stage = system.getWhenTerminated(); stage.thenRun(() ->System.out.println( "--Master Actor System Terminated"));
For legacy purposes I need to use 2.5.9, but am confused on the first parameter, I would like to do something the same like this:
Future<Terminated> fts = system.whenTerminated(); fts.onComplete( () -> System.out.println( "--Master actor system terminated"), , system.dispatcher());
- Is this a viable option for 2.5.9
- What do I pass i for the first parameter?