Package akka.stream

Interface RestartSettings.RestartFailure

  • Enclosing class:
    RestartSettings

    public static interface RestartSettings.RestartFailure
    A failure that restarts the stream, passed to the callback of LogSettings.withFailureLogging.

    Instances are created by Akka streams. It is a trait so that a callback can be unit tested with an instance created by the test, but it should not be implemented for other purposes, as members may be added in future releases.

    • Method Detail

      • cause

        java.lang.Throwable cause()
        The failure that restarts the stream
      • consecutiveFailures

        int consecutiveFailures()
        The number of consecutive restarts including this one, as shown in the default log message. Restarts because of completion are counted too.
      • defaultLogLevel

        Logging.LogLevel defaultLogLevel()
        The level the default logging would log this failure at, as decided by the RestartSettings.LogSettings and the stream attributes. Attributes.LogLevels.Off (Java: Attributes.logLevelOff()) if it would not be logged.
      • defaultVerbose

        boolean defaultVerbose()
        If the default logging would include the stack trace of the failure, always false if it would not log it
      • log

        LoggingAdapter log()
        The logging adapter of the restarting stage
      • logDefault

        void logDefault()
        Log the failure in the same way as the default logging, for failures the callback does not handle itself. Must only be called from within the callback, on the thread that invokes it. The other members are snapshots that stay valid after the callback returns, this method does not.