public final class ActorSystemImpl.TerminationCallbacks<T>
extends java.lang.Object
Constructor and Description |
---|
TerminationCallbacks(scala.concurrent.Future<T> upStreamTerminated,
scala.concurrent.ExecutionContext ec) |
Modifier and Type | Method and 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.
|
public TerminationCallbacks(scala.concurrent.Future<T> upStreamTerminated, scala.concurrent.ExecutionContext ec)
public final void add(java.lang.Runnable r)
r
- The callback to be executed on ActorSystem termination
Throws RejectedExecutionException if called after ActorSystem has been terminated.public scala.concurrent.Future<T> terminationFuture()