Package org.apache.pekko.stream.javadsl
Class Partition$
java.lang.Object
org.apache.pekko.stream.javadsl.Partition$
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''' all of the outputs stops backpressuring and there is an input element available
'''Backpressures when''' one of the outputs backpressure
'''Completes when''' upstream completes
'''Cancels when''' when any (eagerCancel=true) or all (eagerCancel=false) of the downstreams cancel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Partition$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Graph<UniformFanOutShape<T,T>, NotUsed> Create a newPartitionoperator with the specified input type,eagerCancelisfalse.<T> Graph<UniformFanOutShape<T,T>, NotUsed> Create a newPartitionoperator with the specified input type.<T> Graph<UniformFanOutShape<T,T>, NotUsed> Create a newPartitionoperator with the specified input type,eagerCancelisfalse.<T> Graph<UniformFanOutShape<T,T>, NotUsed> Create a newPartitionoperator with the specified input type.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Partition$
public Partition$()
-
-
Method Details
-
create
public <T> Graph<UniformFanOutShape<T,T>, createNotUsed> (int outputCount, Function<T, Integer> partitioner) Create a newPartitionoperator with the specified input type,eagerCancelisfalse.- Parameters:
outputCount- number of output portspartitioner- function deciding which output each element will be targeted
-
create
public <T> Graph<UniformFanOutShape<T,T>, createNotUsed> (int outputCount, Function<T, Integer> partitioner, boolean eagerCancel) Create a newPartitionoperator with the specified input type.- Parameters:
outputCount- number of output portspartitioner- function deciding which output each element will be targetedeagerCancel- this operator cancels, when any (true) or all (false) of the downstreams cancel
-
create
public <T> Graph<UniformFanOutShape<T,T>, createNotUsed> (Class<T> clazz, int outputCount, Function<T, Integer> partitioner) Create a newPartitionoperator with the specified input type,eagerCancelisfalse.- Parameters:
clazz- a type hint for this methodoutputCount- number of output portspartitioner- function deciding which output each element will be targeted
-
create
public <T> Graph<UniformFanOutShape<T,T>, createNotUsed> (Class<T> clazz, int outputCount, Function<T, Integer> partitioner, boolean eagerCancel) Create a newPartitionoperator with the specified input type.- Parameters:
clazz- a type hint for this methodoutputCount- number of output portspartitioner- function deciding which output each element will be targetedeagerCancel- this operator cancels, when any (true) or all (false) of the downstreams cancel
-