Class UniqueKillSwitch
- java.lang.Object
- 
- akka.stream.UniqueKillSwitch
 
- 
- All Implemented Interfaces:
- KillSwitch
 
 public final class UniqueKillSwitch extends java.lang.Object implements KillSwitch AUniqueKillSwitchis always a result of a materialization (unlikeSharedKillSwitchwhich is constructed before any materialization) and it always controls that graph and operator which yielded the materialized value.After calling shutdown()the running instance of theGraphofFlowShapethat materialized to theUniqueKillSwitchwill 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.After calling abort(java.lang.Throwable)the running instance of theGraphofFlowShapethat materialized to theUniqueKillSwitchwill 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.It is also possible to individually cancel, complete or fail upstream and downstream parts by calling the corresponding methods. 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort(java.lang.Throwable ex)After callingabort(java.lang.Throwable)the running instance of theGraphofFlowShapethat materialized to theUniqueKillSwitchwill fail its downstream with the provided exception and cancel its upstream (unless if finished or failed already in which case the command is ignored).voidshutdown()After callingshutdown()the running instance of theGraphofFlowShapethat materialized to theUniqueKillSwitchwill complete its downstream and cancel its upstream (unless if finished or failed already in which case the command is ignored).java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
abortpublic void abort(java.lang.Throwable ex) After callingabort(java.lang.Throwable)the running instance of theGraphofFlowShapethat materialized to theUniqueKillSwitchwill 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:
- abortin interface- KillSwitch
 
 - 
shutdownpublic void shutdown() After callingshutdown()the running instance of theGraphofFlowShapethat materialized to theUniqueKillSwitchwill 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.- Specified by:
- shutdownin interface- KillSwitch
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-