small fixes to stream supervision
This commit is contained in:
parent
ac9c61a3a5
commit
2959159e78
4 changed files with 37 additions and 30 deletions
|
|
@ -252,8 +252,15 @@ final case class ActorFlowMaterializerSettings(
|
|||
* overridden for specific sections of the stream operations with
|
||||
* [[akka.stream.javadsl.OperationAttributes#supervisionStrategy]].
|
||||
*/
|
||||
def withSupervisionStrategy(decider: japi.Function[Throwable, Supervision.Directive]): ActorFlowMaterializerSettings =
|
||||
copy(supervisionDecider = e ⇒ decider.apply(e))
|
||||
def withSupervisionStrategy(decider: japi.Function[Throwable, Supervision.Directive]): ActorFlowMaterializerSettings = {
|
||||
import Supervision._
|
||||
copy(supervisionDecider = decider match {
|
||||
case `resumingDecider` => resumingDecider
|
||||
case `restartingDecider` => restartingDecider
|
||||
case `stoppingDecider` => stoppingDecider
|
||||
case other => other.apply _
|
||||
})
|
||||
}
|
||||
|
||||
def withDebugLogging(enable: Boolean): ActorFlowMaterializerSettings =
|
||||
copy(debugLogging = enable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue