Package akka.stream.impl
Class SubFusingActorMaterializerImpl
- java.lang.Object
-
- akka.stream.Materializer
-
- akka.stream.impl.SubFusingActorMaterializerImpl
-
public class SubFusingActorMaterializerImpl extends Materializer
This materializer replaces the default phase with one that will fuse operators into an existing interpreter (viaregisterShell), rather than start a new actor for each of them.The default phases are left in-tact since we still respect
.asyncand other tags that were marked within a sub-fused graph.
-
-
Constructor Summary
Constructors Constructor Description SubFusingActorMaterializerImpl(ExtendedActorMaterializer delegate, scala.Function1<GraphInterpreterShell,ActorRef> registerShell)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtendedActorMaterializerdelegate()scala.concurrent.ExecutionContextExecutorexecutionContext()Running a flow graph will require execution resources, as will computations within Sources, Sinks, etc.<Mat> Matmaterialize(Graph<ClosedShape,Mat> runnable)This method interprets the given Flow description and creates the running stream.<Mat> Matmaterialize(Graph<ClosedShape,Mat> runnable, Attributes defaultAttributes)This method interprets the given Flow description and creates the running stream using an explicitly providedAttributesas top level (least specific) attributes that will be defaults for the materialized stream.CancellablescheduleOnce(scala.concurrent.duration.FiniteDuration delay, java.lang.Runnable task)Interface for operators that need timer services for their functionality.CancellableschedulePeriodically(scala.concurrent.duration.FiniteDuration initialDelay, scala.concurrent.duration.FiniteDuration interval, java.lang.Runnable task)Interface for operators that need timer services for their functionality.java.lang.ObjectsubFusingPhase()SubFusingActorMaterializerImplwithNamePrefix(java.lang.String name)-
Methods inherited from class akka.stream.Materializer
matFromSystem
-
-
-
-
Constructor Detail
-
SubFusingActorMaterializerImpl
public SubFusingActorMaterializerImpl(ExtendedActorMaterializer delegate, scala.Function1<GraphInterpreterShell,ActorRef> registerShell)
-
-
Method Detail
-
delegate
public ExtendedActorMaterializer delegate()
-
executionContext
public scala.concurrent.ExecutionContextExecutor executionContext()
Description copied from class:MaterializerRunning a flow graph will require execution resources, as will computations within Sources, Sinks, etc. ThisExecutionContextExecutorcan 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:
executionContextin classMaterializer- Returns:
- (undocumented)
-
materialize
public <Mat> Mat materialize(Graph<ClosedShape,Mat> runnable)
Description copied from class:MaterializerThis method interprets the given Flow description and creates the running stream. The result can be highly implementation specific, ranging from local actor chains to remote-deployed processing networks.- Specified by:
materializein classMaterializer- Parameters:
runnable- (undocumented)- Returns:
- (undocumented)
-
materialize
public <Mat> Mat materialize(Graph<ClosedShape,Mat> runnable, Attributes defaultAttributes)
Description copied from class:MaterializerThis method interprets the given Flow description and creates the running stream using an explicitly providedAttributesas top level (least specific) attributes that will be defaults for the materialized stream. The result can be highly implementation specific, ranging from local actor chains to remote-deployed processing networks.- Specified by:
materializein classMaterializer- Parameters:
runnable- (undocumented)defaultAttributes- (undocumented)- Returns:
- (undocumented)
-
scheduleOnce
public Cancellable scheduleOnce(scala.concurrent.duration.FiniteDuration delay, java.lang.Runnable task)
Description copied from class:MaterializerInterface for operators that need timer services for their functionality. Schedules a single task with the given delay.- Specified by:
scheduleOncein classMaterializer- Parameters:
delay- (undocumented)task- (undocumented)- Returns:
- A
Cancellablethat 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:MaterializerInterface for operators that need timer services for their functionality. Schedules a repeated task with the given interval between invocations.- Specified by:
schedulePeriodicallyin classMaterializer- Parameters:
initialDelay- (undocumented)interval- (undocumented)task- (undocumented)- Returns:
- A
Cancellablethat allows cancelling the timer. Cancelling is best effort, if the event has been already enqueued it will not have an effect.
-
subFusingPhase
public java.lang.Object subFusingPhase()
-
withNamePrefix
public SubFusingActorMaterializerImpl withNamePrefix(java.lang.String name)
- Specified by:
withNamePrefixin classMaterializer
-
-