Partition

org.apache.pekko.stream.scaladsl.Partition
See thePartition companion object
final class Partition[T](val outputPorts: Int, val partitioner: T => Int, val eagerCancel: Boolean) extends GraphStage[UniformFanOutShape[T, T]]

Fan-out the stream to several streams. emitting an incoming upstream element to one downstream consumer according to the partitioner function applied to the element

Adheres to the ActorAttributes.SupervisionStrategy attribute.

'''Emits when''' emits when an element is available from the input and the chosen output has demand

'''Backpressures when''' the currently chosen output back-pressures

'''Completes when''' upstream completes and no output is pending

'''Cancels when''' all downstreams have cancelled (eagerCancel=false) or one downstream cancels (eagerCancel=true)

Attributes

Companion
object
Source
Graph.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Shape = UniformFanOutShape[T, T]

Type-level accessor for the shape parameter of this graph.

Type-level accessor for the shape parameter of this graph.

Attributes

Inherited from:
Graph
Source
Graph.scala

Value members

Deprecated constructors

def this(outputPorts: Int, partitioner: T => Int)

Sets eagerCancel to false.

Sets eagerCancel to false.

Attributes

Deprecated
true
Source
Graph.scala

Concrete methods

override def createLogic(inheritedAttributes: Attributes): GraphStageLogic

Attributes

Definition Classes
Source
Graph.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
Graph.scala

Inherited methods

Add the given attributes to this Graph. If the specific attribute was already present on this graph this means the added attribute will be more specific than the existing one. If this Source is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

Add the given attributes to this Graph. If the specific attribute was already present on this graph this means the added attribute will be more specific than the existing one. If this Source is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

Attributes

Inherited from:
Graph
Source
Graph.scala
def async(dispatcher: String, inputBufferSize: Int): Graph[UniformFanOutShape[T, T], NotUsed]

Put an asynchronous boundary around this Graph

Put an asynchronous boundary around this Graph

Value parameters

dispatcher

Run the graph on this dispatcher

inputBufferSize

Set the input buffer to this size for the graph

Attributes

Inherited from:
Graph
Source
Graph.scala
def async(dispatcher: String): Graph[UniformFanOutShape[T, T], NotUsed]

Put an asynchronous boundary around this Graph

Put an asynchronous boundary around this Graph

Value parameters

dispatcher

Run the graph on this dispatcher

Attributes

Inherited from:
Graph
Source
Graph.scala

Put an asynchronous boundary around this Graph

Put an asynchronous boundary around this Graph

Attributes

Inherited from:
Graph
Source
Graph.scala
final override def createLogicAndMaterializedValue(inheritedAttributes: Attributes): (GraphStageLogic, NotUsed)

Attributes

Definition Classes
Inherited from:
GraphStage
Source
GraphStage.scala

Attributes

Inherited from:
Graph
Source
Graph.scala
protected def initialAttributes: Attributes

Attributes

Inherited from:
GraphStageWithMaterializedValue
Source
GraphStage.scala

Specifies the name of the Graph. If the name is null or empty the name is ignored, i.e. #none is returned.

Specifies the name of the Graph. If the name is null or empty the name is ignored, i.e. #none is returned.

Attributes

Inherited from:
Graph
Source
Graph.scala
final override def withAttributes(attr: Attributes): Graph[UniformFanOutShape[T, T], NotUsed]

Replace the attributes of this Flow with the given ones. If this Flow is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

Replace the attributes of this Flow with the given ones. If this Flow is a composite of multiple graphs, new attributes on the composite will be less specific than attributes set directly on the individual graphs of the composite.

Attributes

Definition Classes
Inherited from:
GraphStageWithMaterializedValue
Source
GraphStage.scala

Concrete fields

Attributes

Source
Graph.scala
val in: Inlet[T]

Attributes

Source
Graph.scala
val out: Seq[Outlet[T]]

Attributes

Source
Graph.scala

Attributes

Source
Graph.scala
val partitioner: T => Int

Attributes

Source
Graph.scala
override val shape: UniformFanOutShape[T, T]

The shape of a graph is all that is externally visible: its inlets and outlets.

The shape of a graph is all that is externally visible: its inlets and outlets.

Attributes

Source
Graph.scala