Package akka.stream
Class UniqueKillSwitch
- java.lang.Object
-
- akka.stream.UniqueKillSwitch
-
- All Implemented Interfaces:
KillSwitch
public final class UniqueKillSwitch extends java.lang.Object implements KillSwitch
After callingshutdown()
the running instance of theGraph
ofFlowShape
that materialized to theUniqueKillSwitch
will complete its downstream and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.
-
-
Constructor Summary
Constructors Constructor Description UniqueKillSwitch(scala.concurrent.Promise<Done> promise)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(java.lang.Throwable ex)
After callingUniqueKillSwitch#abort()
the running instance of theGraph
ofFlowShape
that materialized to theUniqueKillSwitch
will fail its downstream with the provided exception and cancel its upstream (unless if finished or failed already in which case the command is ignored).void
shutdown()
java.lang.String
toString()
-
-
-
Constructor Detail
-
UniqueKillSwitch
public UniqueKillSwitch(scala.concurrent.Promise<Done> promise)
-
-
Method Detail
-
abort
public void abort(java.lang.Throwable ex)
After callingUniqueKillSwitch#abort()
the running instance of theGraph
ofFlowShape
that materialized to theUniqueKillSwitch
will fail its downstream with the provided exception and cancel its upstream (unless if finished or failed already in which case the command is ignored). Subsequent invocations of completion commands will be ignored.- Specified by:
abort
in interfaceKillSwitch
- Parameters:
ex
- (undocumented)
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceKillSwitch
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-