Package akka.http.impl.engine.server
Class MasterServerTerminator
- java.lang.Object
-
- akka.http.impl.engine.server.MasterServerTerminator
-
- All Implemented Interfaces:
ServerTerminator
public final class MasterServerTerminator extends java.lang.Object implements ServerTerminator
INTERNAL API: Collects signals from per-connection terminators and manages the termination process kickoff
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MasterServerTerminator.AliveConnectionTerminators
static class
MasterServerTerminator.AliveConnectionTerminators$
static interface
MasterServerTerminator.State
static class
MasterServerTerminator.Terminating
static class
MasterServerTerminator.Terminating$
-
Constructor Summary
Constructors Constructor Description MasterServerTerminator(akka.event.LoggingAdapter log)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
registerConnection(ServerTerminator terminator, scala.concurrent.ExecutionContext ec)
Registers an per-connection terminator.void
removeConnection(ServerTerminator terminator)
Removes a previously registered per-connection terminator.scala.concurrent.Future<Http.HttpTerminated>
terminate(scala.concurrent.duration.FiniteDuration timeout, scala.concurrent.ExecutionContext ex)
Initiate the termination sequence of this server.
-
-
-
Method Detail
-
registerConnection
public boolean registerConnection(ServerTerminator terminator, scala.concurrent.ExecutionContext ec)
Registers an per-connection terminator. Once the master terminator gets the termination signal, it will delegate the signal to all registered terminators (existing connections).- Parameters:
terminator
- (undocumented)ec
- (undocumented)- Returns:
- true if registered successfully and not terminating, false if termination in-flight
(and the terminators
terminate()
will be invoked in that case automatically)
-
removeConnection
public void removeConnection(ServerTerminator terminator)
Removes a previously registered per-connection terminator. Terminators must remove themselves like this once their respective connection is closed, otherwise they would leak and remain in the set indefinitely.- Parameters:
terminator
- (undocumented)
-
terminate
public scala.concurrent.Future<Http.HttpTerminated> terminate(scala.concurrent.duration.FiniteDuration timeout, scala.concurrent.ExecutionContext ex)
Description copied from interface:ServerTerminator
Initiate the termination sequence of this server.- Specified by:
terminate
in interfaceServerTerminator
- Parameters:
timeout
- (undocumented)ex
- (undocumented)- Returns:
- (undocumented)
-
-