Package akka.stream

Class Attributes$

  • All Implemented Interfaces:
    java.io.Serializable, scala.Serializable

    public class Attributes$
    extends java.lang.Object
    implements scala.Serializable
    Cancellation strategies provide a way to configure the behavior of a stage when cancelStage is called.

    It is only relevant for stream components that have more than one output and do not define a custom cancellation behavior by overriding onDownstreamFinish. In those cases, if the first output is cancelled, the default behavior is to call cancelStage which shuts down the stage completely. The given strategy will allow customization of how the shutdown procedure should be done precisely.

    See Also:
    Serialized Form
    • Field Detail

      • MODULE$

        public static final Attributes$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • Attributes$

        public Attributes$()
    • Method Detail

      • $lessinit$greater$default$1

        public scala.collection.immutable.List<Attributes.Attribute> $lessinit$greater$default$1()
      • cancellationStrategyCompleteState

        public akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyCompleteState()
      • cancellationStrategyFailStage

        public akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyFailStage()
        Strategy that treats cancelStage the same as failStage, i.e. all inlets are cancelled (propagating the cancellation cause) and all outlets are failed with an SiblingDownstreamWasCancelled exception.
        Returns:
        (undocumented)
      • cancellationStrategyAfterDelay

        public akka.stream.Attributes.CancellationStrategy.Strategy cancellationStrategyAfterDelay​(scala.concurrent.duration.FiniteDuration delay,
                                                                                                   akka.stream.Attributes.CancellationStrategy.Strategy strategy)
        Strategy that allows to delay any action when cancelStage is invoked.

        The idea of this strategy is to delay any action on cancellation because it is expected that the stage is completed through another path in the meantime. The downside is that a stage and a stream may live longer than expected if no such signal is received and cancellation is invoked later on. In streams with many stages that all apply this strategy, this strategy might significantly delay the propagation of a cancellation signal because each upstream stage might impose such a delay. During this time, the stream will be mostly "silent", i.e. it cannot make progress because of backpressure, but you might still be able observe a long delay at the ultimate source.

        Parameters:
        delay - (undocumented)
        strategy - (undocumented)
        Returns:
        (undocumented)
      • asyncBoundary

        public Attributes asyncBoundary()
      • name

        public Attributes name​(java.lang.String name)
        Specifies the name of the operation. If the name is null or empty the name is ignored, i.e. none() is returned.

        When using this method the name is encoded with URLEncoder with UTF-8 because the name is sometimes used as part of actor name. If that is not desired the name can be added in it's raw format using .addAttributes(Attributes(Name(name))).

        Parameters:
        name - (undocumented)
        Returns:
        (undocumented)
      • inputBuffer

        public Attributes inputBuffer​(int initial,
                                      int max)
        Specifies the initial and maximum size of the input buffer.
        Parameters:
        initial - (undocumented)
        max - (undocumented)
        Returns:
        (undocumented)
      • createLogLevels

        public Attributes createLogLevels​(Logging.LogLevel onElement,
                                          Logging.LogLevel onFinish,
                                          Logging.LogLevel onFailure)
        Java API

        Configures log() operator log-levels to be used when logging. Logging a certain operation can be completely disabled by using Attributes.logLevelOff().

        Parameters:
        onElement - (undocumented)
        onFinish - (undocumented)
        onFailure - (undocumented)
        Returns:
        (undocumented)
      • createLogLevels

        public Attributes createLogLevels​(Logging.LogLevel onElement)
        Java API

        Configures log() operator log-levels to be used when logging onElement. Logging a certain operation can be completely disabled by using Attributes.logLevelOff().

        Parameters:
        onElement - (undocumented)
        Returns:
        (undocumented)
      • logLevels

        public Attributes logLevels​(Logging.LogLevel onElement,
                                    Logging.LogLevel onFinish,
                                    Logging.LogLevel onFailure)
        Configures log() operator log-levels to be used when logging. Logging a certain operation can be completely disabled by using LogLevels.Off.

        See Attributes.createLogLevels for Java API

        Parameters:
        onElement - (undocumented)
        onFinish - (undocumented)
        onFailure - (undocumented)
        Returns:
        (undocumented)
      • extractName

        public java.lang.String extractName​(TraversalBuilder builder,
                                            java.lang.String default_)
        Compute a name by concatenating all Name attributes that the given module has, returning the given default value if none are found.
        Parameters:
        builder - (undocumented)
        default_ - (undocumented)
        Returns:
        (undocumented)