Package akka.actor
Class ActorSystemImpl.TerminationCallbacks<T>
- java.lang.Object
-
- akka.actor.ActorSystemImpl.TerminationCallbacks<T>
-
- Enclosing class:
- ActorSystemImpl
public final class ActorSystemImpl.TerminationCallbacks<T> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TerminationCallbacks(scala.concurrent.Future<T> upStreamTerminated, scala.concurrent.ExecutionContext ec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.Runnable r)
Adds a Runnable that will be executed on ActorSystem termination.scala.concurrent.Future<T>
terminationFuture()
Returns a Future which will be completed once all registered callbacks have been executed.
-
-
-
Constructor Detail
-
TerminationCallbacks
public TerminationCallbacks(scala.concurrent.Future<T> upStreamTerminated, scala.concurrent.ExecutionContext ec)
-
-
Method Detail
-
add
public final void add(java.lang.Runnable r)
Adds a Runnable that will be executed on ActorSystem termination. Note that callbacks are executed in reverse order of insertion.- Parameters:
r
- The callback to be executed on ActorSystem termination Throws RejectedExecutionException if called after ActorSystem has been terminated.
-
terminationFuture
public scala.concurrent.Future<T> terminationFuture()
Returns a Future which will be completed once all registered callbacks have been executed.
-
-