@@ -27,7 +27,7 @@ import scala.util.control.Exception.Catcher
2727
2828import org .apache .pekko
2929import pekko .actor .{ ActorRef , Terminated }
30- import pekko .annotation .{ DoNotInherit , InternalApi }
30+ import pekko .annotation .InternalApi
3131import pekko .event ._
3232import pekko .event .Logging .LogLevel
3333import pekko .stream .{ Supervision , _ }
@@ -206,33 +206,6 @@ import pekko.util.ccompat._
206206 override def toString = " DropWhile"
207207}
208208
209- /**
210- * INTERNAL API
211- */
212- @ DoNotInherit private [pekko] abstract class SupervisedGraphStageLogic (inheritedAttributes : Attributes , shape : Shape )
213- extends GraphStageLogic (shape) {
214- private lazy val decider = inheritedAttributes.mandatoryAttribute[SupervisionStrategy ].decider
215-
216- def withSupervision [T ](f : () => T ): Option [T ] =
217- try {
218- Some (f())
219- } catch {
220- case NonFatal (ex) =>
221- decider(ex) match {
222- case Supervision .Stop => onStop(ex)
223- case Supervision .Resume => onResume(ex)
224- case Supervision .Restart => onRestart(ex)
225- }
226- None
227- }
228-
229- def onResume (t : Throwable ): Unit
230-
231- def onStop (t : Throwable ): Unit = failStage(t)
232-
233- def onRestart (t : Throwable ): Unit = onResume(t)
234- }
235-
236209private [stream] object Collect {
237210 // Cached function that can be used with PartialFunction.applyOrElse to ensure that A) the guard is only applied once,
238211 // and the caller can check the returned value with Collect.notApplied to query whether the PF was applied or not.
0 commit comments