Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

예외의 종류에따라, 복구(재개,재시작,중지,탈출) 전략 선택가능선택가능합니다. 

이러한 복구전략은 Actor별로도 분리될수 있습니다.

...

Code Block
themeEmacs
        protected override SupervisorStrategy SupervisorStrategy()
        {
            return new OneForOneStrategy(
                maxNrOfRetries: 10,
                withinTimeRange: TimeSpan.FromMinutes(1),
                localOnlyDecider: ex =>
                {
                    switch (ex)
                    {
                        case ArithmeticException ae:
                            return Directive.Resume;
                        case NullReferenceException nre:
                            return Directive.Restart;
                        case ArgumentException are:
                            return Directive.Stop;
                        default:
                            return Directive.Escalate;
                    }
                });
        }

...