Class PhasedFusingActorMaterializer

    • Method Detail

      • Debug

        public static boolean Debug()
      • DefaultPhase

        public static Phase<java.lang.Object> DefaultPhase()
      • DefaultPhases

        public static scala.collection.immutable.Map<IslandTag,​Phase<java.lang.Object>> DefaultPhases()
      • apply

        public static PhasedFusingActorMaterializer apply​(ActorSystem system,
                                                          ActorMaterializerSettings settings,
                                                          Attributes defaultAttributes,
                                                          Dispatchers dispatchers,
                                                          ActorRef supervisor,
                                                          java.util.concurrent.atomic.AtomicBoolean haveShutDown,
                                                          SeqActorName flowNames)
        INTERNAL API

        defaultAttributes for the materializer, based on the ActorMaterializerSettings and are always seen as least specific, so any attribute specified in the graph "wins" over these. In addition to that this also guarantees that the attributes InputBuffer, SupervisionStrategy, and Dispatcher is _always_ present in the attributes and can be accessed through Attributes.mandatoryAttribute

        When these attributes are needed later in the materialization process it is important that they are gotten through the attributes and not through the ActorMaterializerSettings

        Parameters:
        system - (undocumented)
        settings - (undocumented)
        defaultAttributes - (undocumented)
        dispatchers - (undocumented)
        supervisor - (undocumented)
        haveShutDown - (undocumented)
        flowNames - (undocumented)
        Returns:
        (undocumented)
      • defaultAttributes

        public Attributes defaultAttributes()
      • haveShutDown

        public java.util.concurrent.atomic.AtomicBoolean haveShutDown()
      • shutdown

        public void shutdown()
        Description copied from class: ActorMaterializer
        Shuts down this materializer and all the operators that have been materialized through this materializer. After having shut down, this materializer cannot be used again. Any attempt to materialize operators after having shut down will result in an IllegalStateException being thrown at materialization time.
        Specified by:
        shutdown in class ActorMaterializer
      • isShutdown

        public boolean isShutdown()
        Description copied from class: ActorMaterializer
        Indicates if the materializer has been shut down.
        Specified by:
        isShutdown in class ActorMaterializer
        Returns:
        (undocumented)
      • withNamePrefix

        public PhasedFusingActorMaterializer withNamePrefix​(java.lang.String name)
        Description copied from class: Materializer
        The namePrefix shall be used for deriving the names of processing entities that are created during materialization. This is meant to aid logging and failure reporting both during materialization and while the stream is running.
        Specified by:
        withNamePrefix in class ExtendedActorMaterializer
        Parameters:
        name - (undocumented)
        Returns:
        (undocumented)
      • executionContext

        public scala.concurrent.ExecutionContextExecutor executionContext()
        Description copied from class: Materializer
        Running a flow graph will require execution resources, as will computations within Sources, Sinks, etc. This ExecutionContextExecutor can be used by parts of the flow to submit processing jobs for execution, run Future callbacks, etc.

        Note that this is not necessarily the same execution context the stream operator itself is running on.

        Specified by:
        executionContext in class Materializer
        Returns:
        (undocumented)
      • scheduleWithFixedDelay

        public Cancellable scheduleWithFixedDelay​(scala.concurrent.duration.FiniteDuration initialDelay,
                                                  scala.concurrent.duration.FiniteDuration delay,
                                                  java.lang.Runnable task)
        Description copied from class: Materializer
        Interface for operators that need timer services for their functionality.

        Schedules a Runnable to be run repeatedly with an initial delay and a fixed delay between subsequent executions.

        It will not compensate the delay between tasks if the execution takes a long time or if scheduling is delayed longer than specified for some reason. The delay between subsequent execution will always be (at least) the given delay. In the long run, the frequency of execution will generally be slightly lower than the reciprocal of the specified delay.

        If the Runnable throws an exception the repeated scheduling is aborted, i.e. the function will not be invoked any more.

        Specified by:
        scheduleWithFixedDelay in class Materializer
        Parameters:
        initialDelay - (undocumented)
        delay - (undocumented)
        task - (undocumented)
        Returns:
        A Cancellable that allows cancelling the timer. Cancelling is best effort, if the event has been already enqueued it will not have an effect.
      • scheduleAtFixedRate

        public Cancellable scheduleAtFixedRate​(scala.concurrent.duration.FiniteDuration initialDelay,
                                               scala.concurrent.duration.FiniteDuration interval,
                                               java.lang.Runnable task)
        Description copied from class: Materializer
        Interface for operators that need timer services for their functionality.

        Schedules a Runnable to be run repeatedly with an initial delay and a frequency. E.g. if you would like the function to be run after 2 seconds and thereafter every 100ms you would set delay=Duration(2, TimeUnit.SECONDS) and interval=Duration(100, TimeUnit.MILLISECONDS).

        It will compensate the delay for a subsequent task if the previous tasks took too long to execute. In such cases, the actual execution interval will differ from the interval passed to the method.

        If the execution of the tasks takes longer than the interval, the subsequent execution will start immediately after the prior one completes (there will be no overlap of executions). This also has the consequence that after long garbage collection pauses or other reasons when the JVM was suspended all "missed" tasks will execute when the process wakes up again.

        In the long run, the frequency of execution will be exactly the reciprocal of the specified interval.

        Warning: scheduleAtFixedRate can result in bursts of scheduled tasks after long garbage collection pauses, which may in worst case cause undesired load on the system. Therefore scheduleWithFixedDelay is often preferred.

        If the Runnable throws an exception the repeated scheduling is aborted, i.e. the function will not be invoked any more.

        Specified by:
        scheduleAtFixedRate in class Materializer
        Parameters:
        initialDelay - (undocumented)
        interval - (undocumented)
        task - (undocumented)
        Returns:
        A Cancellable that allows cancelling the timer. Cancelling is best effort, if the event has been already enqueued it will not have an effect.
      • schedulePeriodically

        public Cancellable schedulePeriodically​(scala.concurrent.duration.FiniteDuration initialDelay,
                                                scala.concurrent.duration.FiniteDuration interval,
                                                java.lang.Runnable task)
        Description copied from class: Materializer
        Interface for operators that need timer services for their functionality. Schedules a repeated task with the given interval between invocations.

        Specified by:
        schedulePeriodically in class Materializer
        Parameters:
        initialDelay - (undocumented)
        interval - (undocumented)
        task - (undocumented)
        Returns:
        A Cancellable that allows cancelling the timer. Cancelling is best effort, if the event has been already enqueued it will not have an effect.
      • scheduleOnce

        public Cancellable scheduleOnce​(scala.concurrent.duration.FiniteDuration delay,
                                        java.lang.Runnable task)
        Description copied from class: Materializer
        Interface for operators that need timer services for their functionality. Schedules a single task with the given delay.

        Specified by:
        scheduleOnce in class Materializer
        Parameters:
        delay - (undocumented)
        task - (undocumented)
        Returns:
        A Cancellable that allows cancelling the timer. Cancelling is best effort, if the event has been already enqueued it will not have an effect.
      • copy$default$3

        public Attributes copy$default$3()
      • copy$default$5

        public ActorRef copy$default$5()
      • copy$default$6

        public java.util.concurrent.atomic.AtomicBoolean copy$default$6()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • productElementName

        public java.lang.String productElementName​(int x$1)
        Specified by:
        productElementName in interface scala.Product
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object